Problem in Database error in vBulletin 4.2.0:

morteza3245

Well-Known Member
Sep 16, 2013
148
1
68
cPanel Access Level
Root Administrator
Hello
Sometime server send me following email error:

Database error in vBulletin 4.2.0:

Invalid SQL:

SELECT COUNT(*) as cnt,max(lastpost) as lastupdate
FROM thread AS thread
INNER JOIN tagcontent AS tagcontent ON
(tagcontent.tagid = 1 AND tagcontent.contentid = thread.threadid)
WHERE thread.forumid IN()
AND thread.visible = 1
AND thread.sticky IN (0, 1)
AND thread.open <> 10
GROUP BY tagcontent.tagid;

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 ')
AND thread.visible = 1
AND thread.sticky IN (0, 1)' at line 5
Error Number : 1064
Request Date : Wednesday, September 25th 2013 @ 04:01:28 PM
Error Date : Wednesday, September 25th 2013 @ 04:01:28 PM
Script : http://www.site1.com/cron.php?rand=1380124884
Referrer : http://www.site1.com/forum.php
IP Address : 212.7.212.113
Username : not registered
Classname : vB_Database
MySQL Version :
my config in my.cnf is:

[mysqld]
local-infile=0
join_buffer_size=512
query_cache_size=16M
tmp_table_size=32M
max_heap_table_size=256M
thread_cache_size=4
max_allowed_packet=32M
key_buffer_size=963M
query_cache_limit=1M
open_files_limit=43042
can you help me for resolve?

Thanks.
 

Aaron.Edwards

Active Member
Sep 21, 2013
36
0
6
cPanel Access Level
Root Administrator
SELECT COUNT(*) as cnt,max(lastpost) as lastupdate
FROM thread AS thread
INNER JOIN tagcontent AS tagcontent ON
(tagcontent.tagid = 1 AND tagcontent.contentid = thread.threadid)
WHERE thread.forumid IN()
AND thread.visible = 1
AND thread.sticky IN (0, 1)
AND thread.open <> 10
GROUP BY tagcontent.tagid;

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 ')
AND thread.visible = 1
AND thread.sticky IN (0, 1)' at line 5
Error Number : 1064

Note:- Noticed that statement IN () is empty inside the Parenthesis. Please open the file cron.php and search for : "thread.forumid" and make appropriate changes in this cron.php file.
 
Last edited:

Aaron.Edwards

Active Member
Sep 21, 2013
36
0
6
cPanel Access Level
Root Administrator
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 ')
AND thread.visible = 1
AND thread.sticky IN (0, 1)' at line 5
The above error message states that at line no 5, there is an error. It also indicates that there is something wrong near the closed parenthesis. This should be definitely be the script error as it states, its a syntax error, the statement entered in the script is incorrect.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello :)

Yes, this error message appears directly related to your script as opposed to cPanel or MySQL itself. You may want to consult directly with Vbulletin's support if you are unable to resolve the issue.

Thank you.