I'd like a little help with a problem I have.
I'm writing a small forum system, and want to order posts in a forum by a certain order.
A post is either a sticky (a post that stays at the top of the post listing, no matter what, which is identified by an integer set to 1,) or not (eg a normal post, the integer is set to 0)
I want the sticky post to be listed at the top. If you can help give me the SQL for this I'd be most greatful.
Here's my existing SQL query for the forum.
SELECT forum_id, post_id, topic, user, stick FROM ". $DB_TABLE_POST ." WHERE forum_id = '$FORUM_ID' AND parent_id = 0 ORDER BY replytime
Thank you if you can help!