MyBB Community Forums

Full Version: Can't view drafts -- Error 1064
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Whenever I try to view a draft, I see this:

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 MySQL server version for the right syntax to use near ')' at line 1
Query:
SELECT uid, username FROM mybb_users WHERE uid IN ()
I could swear this has something to do with the recipients, but I can't quite remember what to do... and I can't seem to replicate the error on any forum I have set up...

Can you check your database to see if the draft has any recipients...?... You'd get an SQL error if there's a blank IN () because it should be filled with the uid's of users...
(2009-04-08, 07:59 AM)Tomm M Wrote: [ -> ]I could swear this has something to do with the recipients, but I can't quite remember what to do... and I can't seem to replicate the error on any forum I have set up...

Can you check your database to see if the draft has any recipients...?... You'd get an SQL error if there's a blank IN () because it should be filled with the uid's of users...

Honestly have no clue how to do this, but if you can help me do it I'll check it out. I can also send you phpmyadmin info if you think that'd be easier than holding my hand Toungue
I'd rather hold your hand Toungue But in like, a non-gay sort of way, obviously... just so that you can get some sort of know-how...

See this bug report: http://community.mybboard.net/thread-32794.html

Although this for 1.4.0 beta, it still seems to be in 1.4.4. I checked in 1.4.5 and this error is fixed, so upgrading will solve the problem (when it's released!). If it isn't fixed, then there must be a plugin that's causing the errors, or something that isn't default MyBB.

As a quick fix, open mybb_privatemessages table in phpmyadmin, and find the entry - you can probably use the pmid to find it. Make sure that the "toid" field is filled in with a user ID, and that the recipients has something in it. Fill it with this:

a:1:{s:2:"to";a:1:{i:0;s:1:"1";}}

Refresh the drafts folder a few times to update the cache, and you should be able to access the draft.
It's not a huge deal, so I'll wait for 1.4.5. Thanks for your response.
(2009-04-09, 09:40 AM)Bey Brad Wrote: [ -> ]It's not a huge deal, so I'll wait for 1.4.5. Thanks for your response.

If you need it fixed in the mean time, then feel free to PM the database details... Smile