MySQL Forums
Forum List  »  Newbie

Help me with this query syntax please!
Posted by: David Pitman
Date: July 07, 2005 12:33PM

Can anyone tell me what is wrong with this statement:

---

SELECT DISTINCT t.topic_id, t.topic_replies, t.forum_id, t.topic_title, t.topic_views, t.topic_subject, f.forum_name, f.allow_subject_prefix, p.post_id, p.post_time, p.icon, p.uid, p.poster_name FROM xoops_bb_posts AS p LEFT JOIN xoops_bb_topics AS t ON t.topic_last_post_id=p.post_id LEFT JOIN xoops_bb_forums AS f ON f.forum_id=t.forum_id WHERE 1=1 AND t.forum_id IN () AND t.approved = 1 AND p.approved=1 ORDER BY p.post_time DESC

---

Error number: 1064

Error message: 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 t.approved = 1 AND p.approved=1 ORDER BY p.post_time DESC


I am getting this from an installation of newbb on XOOPS 2.0.13, using MySQL 4.0.24-standard. I assume that the problem is something with the "IN()" statement, but I don't know what to do with it. If anyone can help me with this, that would be greatly appreciated!

Thanks.

David.

Options: ReplyQuote


Subject
Written By
Posted
Help me with this query syntax please!
July 07, 2005 12:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.