Quote:
Originally Posted by PitchouneN64ngc
Do you use a prefix for your tables? ($tableprefix in your ./includes/config.php) If yes, modify the table as this (search your wrong query before):
PHP Code:
FROM " . TABLE_PREFIX . "thread AS thread
|
I know that this post is old but I did not see a solution that addressed what was causing the problem.
Code:
Database error in vBulletin 3.0.8:
Invalid SQL:
SELECT threadid, forumid, title, replycount, lastposter, postuserid, postusername FROM thread ORDER BY lastpost DESC LIMIT 20 mysql error: Table 'masscops_vbforum.thread' doesn't exist
mysql error number: 1146
Date: Sunday 21st of August 2005 04:12:33 PM
Script: http://www.masscops.com/forums/marquee.php
Referer: http://www.masscops.com/forums/bbmessenger/index.php?func=m_interface
Username: User
IP Address: **.**.**.**
What needs to be changed is in marquee.php line #38
Was....
Code:
// connect to the database and pull the info we need.
$latestposts = $DB_site->query("
SELECT threadid, forumid, title, replycount, lastposter, postuserid, postusername
FROM thread
ORDER BY lastpost
DESC LIMIT " . THREAD_LIMIT . ""
);
Changed to....
Code:
// connect to the database and pull the info we need.
$latestposts = $DB_site->query("
SELECT threadid, forumid, title, replycount, lastposter, postuserid, postusername
FROM vb3_thread
ORDER BY lastpost
DESC LIMIT " . THREAD_LIMIT . ""
);
FROM [add your prefix here]_thread