SQL Query question
#1
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.
#2
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
#3
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.
#4
That's a column not a table.
[Image: sig.php]
The little boat gently drifted across the pond exactly the way a bowling ball wouldn't.
#5
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?
#6
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.
#7
Thanks, but I checked all over there isn't any option to insert columns. Does anyone know the proper SQL query? =)
#8
Anyone?
This problem is also preventing new users from registering Sad
#9
ALTER TABLE `mybb_users` ADD `awayreason varchar(200) NOT NULL default '';

Try that.
@ryanashbrook
Do NOT PM me for Support!
#10
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


Forum Jump:


Users browsing this thread: 1 Guest(s)