The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
SQL Error - Need Help
I have a plugin with the following code:
PHP Code:
Code:
Database error in vBulletin 4.0.2: Invalid SQL: SELECT COUNT(*) AS threads, SUM(IF(thread.lastpost > 1267592343 AND open <> 10, 1, 0)) AS newthread FROM thread AS thread WHERE forumid = 2 AND sticky = 0 AND visible = 1 AND thread.threadid NOT IN (); 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 13 Error Number : 1064 Request Date : Wednesday, March 3rd 2010 @ 01:55:07 AM Error Date : Wednesday, March 3rd 2010 @ 01:55:07 AM Script : http://localhost/vb40/forumdisplay.php?2-Main-Forum Referrer : http://localhost/vb40/ IP Address : 127.0.0.1 Username : test1 Classname : vB_Database MySQL Version : Thanks Sunil |
#2
|
|||
|
|||
|
#3
|
||||
|
||||
I tried that but it doesn't help.
This same plugin actually runs in vB 3.7 without any issues. So, I think there's some code that's changed in vB 4 that's causing the error? Thanks --------------- Added [DATE]1267661475[/DATE] at [TIME]1267661475[/TIME] --------------- figured it out. the tagthread table in vb 3.7 is changed to tagcontent in vB 4. I changed that in the query but I overlooked the part where the code's still looking for threadid (3.7) instead of contentid (4.0) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|