I've got a question about a discussion board script I've coded... it's been working great for months, but I'm adding in a few tweaks.... right now I'm using this query:
$query = "SELECT * FROM topics WHERE gameid = '$gameid' ORDER BY lastreplytime desc";
Simple enough... selects all columns from table topics where gameid=$gameid and sorts them by the last time one was replied to --- to keep it bumped to the top of course.
Ok, but now I've added in something new, as an admin, I want to be able to post a sticky topic.... a topic that only me the admin can post and it will stay at the top all the time. I have another field in the topics table named status --- if it is a sticky topic, status will be 'sticky' instead of 'open', 'locked', etc.
How can I run a query, or do something, that will check for anything with status = sticky first, then list the other results by lastreplytime as commanded in the query.
Thanks in advance for any help.