Log in

View Full Version : Need some help with this one!


rossmacd
05-15-2005, 09:20 AM
Hi all!

I keep getting this to my e-mail inbox:

Database error in vBulletin 3.0.7:

Invalid SQL:
## GET LATEST THREADS ##
SELECT thread.*,thread.iconid AS threadiconid , post.pagetext AS preview
FROM thread AS thread
LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
LEFT JOIN post AS post ON(post.postid = thread.firstpostid)
WHERE open = '1'
AND forumid NOT IN (0,56,57,58,36,37,66,63,51,38,60,61,33,40,50,59,39 ,21,41,52,54,53,31,30,)
AND thread.visible = '1'
AND deletionlog.primaryid IS NULL
ORDER BY lastpost
DESC LIMIT 10
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 deletionlog.primaryid IS NULL


mysql error number: 1064

Date: Sunday 15th of May 2005 10:07:20 AM
Script: http://www.webdesignerstalk.com/search.php?forumid=46
Referer:
Username: Unregistered
IP Address: 68.142.251.195

How can I stop this as I do not know what the error is. If it helps, my site is http://www.webdesignerstalk.com/

Thank you,

Ross

Colin F
05-15-2005, 09:41 AM
remove the last comma from the list of forumids.

as I assume it's a dynamically generated list, you'll want to remove it with something like php's rtrim() (http://php.benscom.com/manual/en/function.rtrim.php).

rossmacd
05-15-2005, 09:45 AM
This is an error message I recieve at my inbox. Where would I got to remove the comma? Which file would it be in?

Thanks for your help,

Ross