Log in

View Full Version : vBulletin Error - Help! :o


Markro
11-06-2008, 05:43 PM
I'm not sure the cause of this error, does anyone know or has anyone seen it before?


Database error in vBulletin 3.7.2:

Invalid SQL:

SELECT *
FROM threadrate
WHERE userid = 18508
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
Request Date : Thursday, November 6th 2008 @ 02:03:02 AM
Error Date : Thursday, November 6th 2008 @ 02:03:02 AM
Script : http://www.domain.com/showthread.php?
Referrer :
IP Address : xx.xx.xx.xx.xx
Username : User_name
Classname : vB_Database
MySQL Version :


Thanks, Mark

Lynne
11-06-2008, 05:45 PM
Try disabling your plugins and see if you still have this problem.
Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php

define('DISABLE_HOOKS', true);

Markro
11-06-2008, 09:43 PM
I went through all my mods and apparently this was the problem:

"vb.org Style Rating Module"


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;
}
}


Warning to all users who are using this mod, there is an issue with it!

Thank you very much Lynne

Edit: Mod link -> https://vborg.vbsupport.ru/showthread.php?t=155701