PDA

View Full Version : another MySQL error


Smoothie
07-01-2002, 09:25 AM
when deleting a forum, I'm getting this:

Invalid SQL: DELETE FROM access WHERE forumid IN (0,116)
mysql error: Unknown column 'forumid' in 'where clause'

mysql error number: 1054

GSHelpBoy
07-01-2002, 01:58 PM
Check the database table `access` to make sure there is a column `forumid.`

Smoothie
07-01-2002, 03:59 PM
Checked the tables access. No forumid there.

Steve Machol
07-01-2002, 04:06 PM
Something's wrong with your database then. There should be a forumid column in the access table.

GSHelpBoy
07-01-2002, 04:07 PM
Did you delete it?

Smoothie
07-01-2002, 04:14 PM
Nope. Had this problem since day one with vBulletin. Posted over at vb.com, and never got an response.

Steve Machol
07-01-2002, 04:17 PM
If you had this problem all along then something didn't go right when you installed the database. I would post at vb.com and tell them specifically that this column is missing in the access table and ask for the query to get it back.

GSHelpBoy
07-01-2002, 04:20 PM
Try re-installing your forums.

Smoothie
07-01-2002, 04:31 PM
posting over at vb.com now. thanks

Smoothie
07-01-2002, 04:36 PM
If I look in the table forum, there is a field called forumid. Should that be there?

Xenon
07-01-2002, 04:40 PM
it should be in both tables ;)

Smoothie
07-02-2002, 12:02 AM
so far, no help from the people over at vb.com. Can someone else here tell me what i need to do to get the access table fixed?

GSHelpBoy
07-02-2002, 12:50 AM
Just use phpMyAdmin to create a field on the table with the same properties as the `forumid` field on the other table.

See what that does.

Smoothie
07-02-2002, 12:59 AM
FireFly, please help!

Xenon
07-02-2002, 03:23 PM
ok, i'm not firefly, but thats what ya want:
run this query in PHPMyAdmin:
DROP TABLE IF EXISTS access;
CREATE TABLE access (
userid int(10) unsigned NOT NULL default '0',
forumid smallint(5) unsigned NOT NULL default '0',
accessmask smallint(5) unsigned NOT NULL default '0',
UNIQUE KEY userid (userid,forumid)
) TYPE=MyISAM;

Smoothie
07-02-2002, 04:05 PM
Xenon-

Thanks a million. Will running that command have any ill effects on the current database?

Smoothie
07-02-2002, 04:07 PM
This is what I have under the access table:
userid, access_title.

Xenon
07-02-2002, 04:35 PM
it will delete the acces-table, but as you said this error occured since the first day you won't loos any data :)

Smoothie
07-02-2002, 05:11 PM
But, what about access_title?

Xenon
07-02-2002, 10:47 PM
i don't know the access_title field, i think this has been added with one hack you have installed. if you use this hack, you have to redo the sql-query for this hack

Smoothie
07-03-2002, 01:00 AM
Xenon-

Thanks very much for your help. Ran the MySQL command, and its all good now. :)

Xenon
07-03-2002, 12:15 PM
good to here that :)