I am making a basic forum system.
The topics are ordered by timestamp ($date) DESC, so the newest posts appear first in the list.
However, i want to add a 'sticky' feature to the site, where as i can put admin messages that are permanently at the top of the post lists.
I have done this by creating an field in my mysql database called 'sticky' - this is either a 0 (no sticky) and 1 (sticky).
So, ive throught the easyest way to order the topics now is to order by 2 fields, 'sticky' (ASC) and 'time' (DESC).
How can i do this?
My current query is below:
SELECT * FROM posts WHERE forumid = '$cat_id' AND replyid = '' ORDER BY date DESC
Many Thanks!
Jonathan