Hi, a little problem:
when i delete a post in a thread rated and then write the post link it show me an error:
Code:
Database error in vBulletin 3.6.8:
Invalid SQL:
SELECT *
FROM vb_threadrate
WHERE userid = 3
AND threadid =;
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
Error Number : 1064
Date : Sunday, February 10th 2008 @ 12:54:23 PM
Script : http://www.mysite.com/forum/showthread.php?p=84858
Referrer :
IP Address : 87.4.173.165
Username : user
Classname : vb_database
My plugin code is:
Code:
if ($vbulletin->userinfo['userid'])
{
if ($rating = $db->query_first("
SELECT *
FROM " . TABLE_PREFIX . "threadrate
WHERE userid = " . $vbulletin->userinfo['userid'] . "
AND threadid = $threadinfo[threadid]
"))
{
$rated = true;
}
}
Please anyone can help me?
Thank you!