MyBB Community Forums

Full Version: Banning problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all, got the following error:
MySQL error: 1054
Unknown column 'reason' in 'field list'
Query: INSERT INTO knol_banned (uid, admin, gid, oldgroup, dateline, bantime, lifted, reason) VALUES ('395', '1', '7', '7', '1192984075', '0-0-1', '1224626400', 'Reason of banning')
Strange thing is, the user is still online, and does not appear in the banned userlist.
[edit]However, he is marked on the frontpage and in his profile as banned.[/edit]
You seem to have removed the reason column
That's very strange, I did not remove a thing... is this something I can restore in anyway? I'm not realy a big Mysql guru...
See below. Toungue
This won't affect the currently banned users at all?
knol Wrote:This won't affect the currently banned users at all?

It will delete all current banned users =P


Do this
ALTER TABLE `mybb_banned` ADD `reason` VARCHAR(255) NOT NULL default ''
Sorry, I thought you didn't ban someone yet. Toungue
LeX- Wrote:
knol Wrote:This won't affect the currently banned users at all?

It will delete all current banned users =P


Do this
ALTER TABLE `mybb_banned` ADD `reason` VARCHAR(255) NOT NULL default ''

On which I get this error:
SQL-query:

ALTER TABLE ".TABLE_PREFIX."banned ADD reason VARCHAR( 255 ) NOT NULL default ''
MySQL retourneerde:

#1103 - Incorrect table name '".TABLE_PREFIX."banned'
I supose TABLE_PREFIX must be KNOL_PREFIX? In my case that is?
knol Wrote:
LeX- Wrote:
knol Wrote:This won't affect the currently banned users at all?

It will delete all current banned users =P


Do this
ALTER TABLE `mybb_banned` ADD `reason` VARCHAR(255) NOT NULL default ''

On which I get this error:
SQL-query:

ALTER TABLE ".TABLE_PREFIX."banned ADD reason VARCHAR( 255 ) NOT NULL default ''
MySQL retourneerde:

#1103 - Incorrect table name '".TABLE_PREFIX."banned'
I supose TABLE_PREFIX must be KNOL_PREFIX? In my case that is?

-sighs-
ALTER TABLE `knol_banned` ADD `reason` VARCHAR( 255 ) NOT NULL default '' 
I Know, I'm a difficult persons to live with... Rolleyes
However, the last code worked, thank you! Smile

Maybe it is an idea to create a script to check for problems in your mysql and fix them after a move to another server/provider? I think this is where my problem came from. (moved to another host 2 years ago, never had to ban someone before...)