MyBB Community Forums

Full Version: sql error after conversion from VB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
when trying to click on specific forums I get the following error (values being diff wen I click on various forums) :

Quote:MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '2466,4007,4051,4148,4341,4443,4575,4659,4795,4807,5003) AND (visible='1' OR vis' at line 1
Query:
SELECT tid,uid FROM mybb_posts WHERE uid='1' AND tid IN (16,823,2497,4034,5339,3589,3635,3543,,2466,4007,4051,4148,4341,4443,4575,4659,4795,4807,5003) AND (visible='1' OR visible='0')

Forum is a conversion from VB 3.8, I noticed the empty spot in the middle (3543,,2466) but im not sure how to resolve it. this happens for about 4 out of 12 forums.

linux, nginx
mybb 1.6.8
all plugins disabled.

thank you for any help Smile
Odd. Could you link us to your site? Also, have you tried running the recount and rebuild tool?
ran the recounts again with no improvement.

link to an example: http://forum.scriptdev2.com/forumdisplay.php?fid=11

thank you.
Definitely odd. I obviously don't get that error as the query's only ran for logged in users. Could you provide a demo account?
well now im confused.... I logged out, logged in as a new user I created, logged back in as me and it shows up fine.... but now theres a different issue of the same sql nature on another forum section :

uname : demox
pass : demoxx

forum with issue : http://forum.scriptdev2.com/forumdisplay.php?fid=31
Odd indeed. Could you look in phpmyadmin at the mybb_threads table and see if any of them have a blank value for the tid column? That's what seems to be causing the problem some how.
SELECT * FROM mybb_threads WHERE tid IS NULL OR tid = ''; returns nothing
Hm. I'm pretty sure there must be a few blank ones or else that kind of query wouldn't be getting generated. Is there any chance you could post your phpmyadmin login details in the Private Inquiries forum where only staff members and yourself can see them?
that seems slightly impossible if mysql queries (SELECT * FROM mybb_threads WHERE tid < '1' OR tid > '5568' OR tid = '' OR tid IS NULL ) cant detect an empty one where would it show up. but ok, I dont have phpmyadmin so lemme see what I can setup.
I was having the exact same problem. If you have any threads that have been Moved and left a permanent redirect... Delete the threads that say [Moved] and the error should go away
Pages: 1 2