Quote:
Originally Posted by therocks
harmor.. replaced custom_messages.php and reinstalled the product with overwrite allowed... now getting this..
Code:
Database error in vBulletin 3.6.0:
Invalid SQL:
SELECT * FROM thread WHERE forumid='23' ORDER BY threadid DESC LIMIT 5;
MySQL Error : Table '****.thread' doesn't exist
Error Number : 1146
Date : Sunday, August 27th 2006 @ 02:26:29 PM
Script : http://******.com/boards/custom_messages.php?display_order=1
Referrer :
IP Address : ******
Username : therocks
Classname : vb_database
thanks for all the help btw 
|
Use this code
PHP Code:
$getthreads = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "thread WHERE forumid='23' ORDER BY threadid DESC LIMIT 5");
while($lt = $db->fetch_array($getthreads))
{
$latestthreads .= "Title: <a href='showthread.php?t=$lt[threadid]'>".$lt['title']."</a> | Posted By: <a href='member.php?u=$lt[postuserid]'>".$lt['lastposter']."</a><br />";
}
$cm['text'] = str_replace("[latestthreads]", $latestthreads, $cm['text']);