View Single Post
Old 05-24-2012, 05:40 PM   #2 (permalink)
tony
The Addict
 
tony's Avatar
 
Join Date: Aug 2008
Posts: 336
Thanks: 8
tony is on a distinguished road
Default

does your table only has the fields name and comment? you would need an extra field that would hold the date and time when the comment was created then you can order them. For example lets say the field is named created, the sql query would be something like this

sql Code:
SELECT * FROM $tbl_name ORDER BY `created` DESC
the DESC is for descending order, the other option is ASC for ascending order.

I hope this helps.
tony is offline  
Reply With Quote
The Following User Says Thank You to tony For This Useful Post:
Timms (05-24-2012)