PDA

View Full Version : database error, missing column?


onealien
12-22-2011, 02:12 PM
moving db to new server as i upgrade to vb4 from 3.8.6...when i moved to 'forum' db i get this error of a missing column...any suggestions?

Database error in vBulletin 4.1.9:

Invalid SQL:

SELECT forum.forumid, forum.lastpost, forum.lastposter, forum.lastposterid, forum.lastthread, forum.lastthreadid, forum.lasticonid, forum.threadcount, forum.replycount, forum.lastpostid, forum.lastprefixid, user.usergroupid, user.homepage, user.options AS useroptions, IF(userlist.friend = 'yes', 1, 0) AS isfriend,
user.lastactivity, user.lastvisit, IF(user.options & 512, 1, 0) AS invisible

FROM forum AS forum

LEFT JOIN user AS user ON (user.userid = forum.lastposterid)
LEFT JOIN userlist AS userlist ON (userlist.relationid = user.userid AND userlist.type = 'buddy' AND userlist.userid = 2461);

MySQL Error : Unknown column 'forum.lastposterid' in 'field list'
Error Number : 1054

Classname : vB_Database
MySQL Version : 5.0.91-log

assistance appreciated....

kh99
12-22-2011, 03:06 PM
Well, that table is supposed to have that column. But I can't imagine why a table would be missing one column - is it possible that some other software sharing that database created it's own table named "forum"?

onealien
12-24-2011, 03:55 PM
i guess that is possible...but it seems that is a standard install table...
wonder wat this means: user.userid = forum.lastposterid

im going to try and delete the imported info for that table and start it from scratch...
or
does anyone kno the parameters to just create the column?

any other suggestions?

snakes1100
12-24-2011, 04:12 PM
Have you globally disabled your plugins before performing the upgrade?

onealien
12-24-2011, 04:28 PM
no...that might be the problem...
i didnt upgrade..went with a fresh install on new server...and am trying to import the db from old site...ugghh...smth aint working like that...the new site dont even have all the same plugins...maybe i shuld start there...

?

snakes1100
12-24-2011, 04:30 PM
I would start back at step 1, install the original db & files, disable the hook system via config.php and then proceed to run the upgrade.

onealien
12-24-2011, 04:34 PM
how do i globally disable plug ins anyways?

Lynne
12-24-2011, 04:42 PM
You cannot go install one version on another server (4.1.9) and then just import another version over that database (3.8). You need to move the database over and then run the upgrade.php script.

onealien
12-24-2011, 04:42 PM
gotcha lynn...seem to be doing it out of sequence...

aiight..so if i go to current site...dl all files via ftp...dl entire db via myphp...
upload all files onto new server...disable hook system via config.php...
import db...
and run upgrade script...

imma try that...

thank u to everyone for yur help...

cbiweb
07-24-2012, 09:29 PM
I know this thread is a little old but today I had the exact same error (except for userid's, version numbers and such) on one of my forums. So I'm wondering if there is a common denominator here? There are many variables such as mods and server config, but to throw the very same error seems like there's something in common. So what could possibly cause columns and tables to go missing for no apparent reason??

Lynne
07-25-2012, 01:03 AM
Very hard to tell without more information.

Are you sure columns and tables "went missing" versus having never been there in the first place? Have you considered the site may have been hacked (go through the access_logs)? Or the server may have been hacked (go through the server logs)?