View Full Version : MySql help/error
Ronso Rage
01-01-2004, 03:43 PM
I have suddenly started getting this error appearng when i try to move exiting threads to another forum on my board - anybody help me with what it means please, and how to fix it (it still moves the thread but gives me this error when it does)
Database error in vBulletin 2.3.3:
Invalid SQL: SELECT forumid,threadcount,replycount,parentlist,parentid ,lastpost,lastthread,lastposter FROM forum WHERE INSTR(CONCAT(',',parentlist,','),',5,')>0
mysql error: Unknown column 'lastthread' in 'field list'
mysql error number: 1054
Date: Thursday 01st of January 2004 05:28:04 PM
Script: http://final-fantasy-overdrive.co.uk/forums/forums/postings.php
Referer: http://final-fantasy-overdrive.co.uk/forums/postings.php
assassingod
01-01-2004, 03:52 PM
Have you installed any hacks that edit posting.php? Since the 'lastthread' column isn't default, you have probably installed a hack incorrectly (I.E Not running a particular query)
MindTrix
01-01-2004, 03:54 PM
Not a MYSQL genius myself :p
Have you installed any hacks recently that could effect this?
MindTrix
01-01-2004, 03:56 PM
Soz assassingod, posted at same time as you it appears :p
Ronso Rage
01-01-2004, 04:03 PM
not that can think of - that have involved editing posting.php, but i will check and if so recheck the hack - if not any ideas what i can do to eradicate this error
MindTrix
01-01-2004, 04:04 PM
You've most likely just missed a MYSQL query on a hack you recently installed
Ronso Rage
01-01-2004, 04:38 PM
I don't think i have, i also just checked the size of my original postings.php to the one that is on my site and they are the same size - so i assume i haven't modifed anything there either
Lesane
01-01-2004, 04:52 PM
lastthread is not a default row in the table forum so you must have hacked/edited it!
Ronso Rage
01-01-2004, 05:23 PM
I just opened up my postings.php file that is uploaded to my site and couldn't even find any reference to lastthread in it - So i really don't understand it at all.
Is there any other area where this could be getting generated from ??
and if not, if i were to add a blank row to my forum table in the database as lastthread - think that may solve it at all ??
g-force2k2
01-02-2004, 01:35 AM
You can find that line in admin/functions.php
open the file and find this line:
SELECT forumid,threadcount,replycount,parentlist,parentid ,lastpost
And remove the lastthread from that query.
Regards,
g-force2k2
Ronso Rage
01-02-2004, 04:42 PM
You were correct about it being in functions.php, but when i removed i got a different error.
So i have fixed it by adding a 'dummy' row to my forums table as lastthread and now it seems to be working perfectly.
Thanks for the help all of you, as i would have taken forever to get to the bottom of it on my own
g-force2k2
01-02-2004, 07:04 PM
Well keeping the dummy row in the mysql db will only take up space, if you want to post the new error you get I can help you debug that one as well.
Cheers,
g-force2k2
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.