MyBB Community Forums

Full Version: SQL Query question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
My board's missing the Away Reason, I think I dropped the table by mistake.
Could someone tell me what query I should run to add it back?
Thanks.
There isn't an "Away Reason" table and the point that you might have dropped the away reason column in the users table is very unlikely. It's much more likely you accidentally removed it from your template. You can add it back by reverting the postbit template
Tikitiki Wrote:There isn't an "Away Reason" table and the point that you might have dropped the away reason column in the users table is very unlikely. It's much more likely you accidentally removed it from your template. You can add it back by reverting the postbit template

... There is, I'm comparing 2 of my MyBB forum databases. It's under mybb_Users

The one that's having errors when updating profiles is missing AwayReason while the other one has it. I can post screenshots after I'm home from work to prove it.
That's a column not a table.
Ah, I'm not a database person at all so I'm not really sure what's what, lol. Sorry.

Does anyone know how to put it back in?
The database editor you're using should provide a feature to insert columns.

If not, you can use a query to add it back in - can't remember it exactly, but it's ALTER TABLE command.
Thanks, but I checked all over there isn't any option to insert columns. Does anyone know the proper SQL query? =)
Anyone?
This problem is also preventing new users from registering Sad
ALTER TABLE `mybb_users` ADD `awayreason varchar(200) NOT NULL default '';

Try that.
Thanks, but it doesn't seem to work:
------------------------------------------------------------------

Error

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unclosed quote @ 29
STR: `
SQL: ALTER TABLE mybb_users ADD `awayreason varchar(200) NOT NULL default '';

SQL query:

ALTER TABLE mybb_users ADD `awayreason varchar(200) NOT NULL default '';

MySQL said: Documentation
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Pages: 1 2