MyBB Community Forums

Full Version: SQL Error when moving discussions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
  • MyBB Version - 1.2.9
  • PHP version - 4.3.11
  • MySQL version - MySQL 3.23.58
  • Browser - IE7
  • Language (forum) - Dutch

I get a SQL error when moving discussions in my forum. What can it be?

First I enter the topic and then goto the moderation bar.
I select the option to move it and leave a link for 1 day (or more days, tried more values) like the picture.
[Image: move_discussion.gif]

When confirming it I got the following SQL error (i think in hte moderation.php since that one was in my adres bar):
MySQL error: 1064
You have an error in your SQL syntax near 's FROM (mybb_favorites s, mybb_users u) WHERE s.type='s' AND s.tid IN (145) AND ' at line 1
Query: DELETE s FROM (mybb_favorites s, mybb_users u) WHERE s.type='s' AND s.tid IN (145) AND s.uid=u.uid AND (u.usergroup IN (5,1) OR CONCAT(',',u.additionalgroups,',') LIKE ',5,' OR CONCAT(',',u.additionalgroups,',') LIKE ',1,')

The same thing happens when I'm in the display where I see all the discussions in the forum. I mark 1 discussion, and chose to move it via the moderationbar. I select the new location, and then the SQL error appears again.

MySQL error: 1064
You have an error in your SQL syntax near 's FROM (mybb_favorites s, mybb_users u) WHERE s.type='s' AND s.tid IN (147) AND ' at line 1
Query: DELETE s FROM (mybb_favorites s, mybb_users u) WHERE s.type='s' AND s.tid IN (147) AND s.uid=u.uid AND (u.usergroup IN (1,5,1,5,7) OR CONCAT(',',u.additionalgroups,',') LIKE ',1,' OR CONCAT(',',u.additionalgroups,',') LIKE ',5,' OR CONCAT(',',u.additionalgroups,',') LIKE ',1,' OR CONCAT(',',u.additionalgroups,',') LIKE ',5,' OR CONCAT(',',u.additionalgroups,',') LIKE ',7,')

The funny thing is that the disccussion is moved, and a link is on the old location. The SQL error is there for a reason, but I don't know what it is.

Help? Smile
Hi, first, nice detailed support post - you clearly covered everything!

Solution is available here: http://community.mybboard.net/showthread.php?tid=20575 and will be available in 1.2.10.

Chris.
Does that sollution work for me? I mean, I have the latest version of mybb with code and files, only an older version of MySQL is installed @ my webhost.
Or was that also with 1.2.9?
It'll work, that was for 1.2.9 (or maybe 1.2.8 - 1.2.8 and 1.2.9 are identical apart from 3 files)
Thnx. It did work. Next time i'll listen right away RolleyesToungueBig Grin
Chris Boulton Wrote:Hi, first, nice detailed support post - you clearly covered everything!

Solution is available here: http://community.mybboard.net/showthread.php?tid=20575 and will be available in 1.2.10.

Chris.

Hi de di de di de di de di dum!

* Ryan Gordon passes chris a beer
Lol. Hope you have one for me too. I'm thirsty Smile
* Ryan Gordon pulls out a 12 pack
* Ryan Gordon passes them around
Hey, free Beer.

* MrD. takes one.

Thanks Tiki Big Grin
Minors dealing beer >_> Toungue