MyBB Community Forums

Full Version: error coming frequently , plz help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello team,
i am getting this error so many time a day on my forum (i am receiving this by email)

Type: 20
File: (Line no. 0)
Message
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 ')
ORDER BY p.dateline' at line 4
Query:
SELECT u.*, u.username AS userusername, p.*
FROM mybb_posts p
LEFT JOIN mybb_users u ON (u.uid=p.uid)
WHERE p.pid IN ()
ORDER BY p.dateline


please tell what to do and how to correct it................. (what is causing this error)
The error arises due to the following quoted red text;

Quote:SELECT u.*, u.username AS userusername, p.*
FROM mybb_posts p
LEFT JOIN mybb_users u ON (u.uid=p.uid)
WHERE p.pid IN ()
ORDER BY p.dateline

Did you alter the "posts" table or are using any plugin ?
i did not altered any table by my own, if any plugin has done this i don't know.

I am giving you the names of plugin i am using

Registration Checkboxes Plugin (1.2) - active
Akismet (1.2.1) - deactive
Date of Birth on Registration (0.3) - deactive
Guests Can't View Threads (1.1) - deactive
Google SEO (1.1.13) - active
Hello World! (1.0) - deactive
User Profile Image Birthday (1.1) - active
Login Password Conversion (1.0) - active
Page Manager (1.5.1)- deactive
Poll on Index (0.3) - deactive
PostAd (1.2.1) - active
Unanswered Posts (1.0)- active
Undo Delete (1.2.1) - deactive

please tell due to which plugin it may be??
Try to de-activate "Unanswered Posts" 's plugin.
ok i have done that, lets see what happens today.
today would be too late, it will show the results immediately :s
i will surely give u feedback on this ..... whether problem resolved or not
Just to add here, the query is actually right. The userusername part is needed to differentiate between the username from the users table and the posts table. The problem is in the coding which ends up with empty pids resulting in the error.

This has been known to be caused by the Master Meta Tags plugin but I see you don't have it. It might also be related to this bug:
http://dev.mybb.com/issues/1290
hmmm,
thanks for this update........................


error came again


Type: 20
File: (Line no. 0)
Message
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 ')
ORDER BY p.dateline' at line 4
Query:
SELECT u.*, u.username AS userusername, p.*
FROM mybb_posts p
LEFT JOIN mybb_users u ON (u.uid=p.uid)
WHERE p.pid IN ()
ORDER BY p.dateline


what to do now... it this a bug........... and nothing can be done.