chinclub Posted May 9, 2007 Share Posted May 9, 2007 I have a very basic forum script that came with a virtual pet community script I bought. Right now it calls new topics by: $sql = mysql_query("SELECT * FROM `forum` WHERE `threadID`='0' AND ORDER BY `id` DESC"); and it calls replies by: $replies = mysql_num_rows(mysql_query("SELECT * FROM `forum` WHERE `threadID`='$id' ")); For this reason it lists posts on the main page by the order they were created. I would rather them be placed in the order of date, however, since the main script calls by threadID=0 it won't look at the date of the replies. Is there a way to call the database and include all threadIDs in the ORDER BY section? If not does anyone know of a very simple forum PHP script that I can replace this one with that would be easy to tie into my existing database of members that might have a bit more features (such as order by replies, smilies, maybe even font colors <- dare I dream! ) I am still very new at PHP so I need something easy to manipulate. THANKS! Quote Link to comment Share on other sites More sharing options...
tippy_102 Posted May 18, 2007 Share Posted May 18, 2007 Could you not use ORDER BY `datefield` DESC ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.