zehrila Posted June 11, 2011 Share Posted June 11, 2011 I have commenting system in place, which works just fine, however, it works in a way that new comments goes at the end of page, i was wondering if i could place some code, which computers which comment is latest and then show it on top of older comments? in short, i want latest comments to show up first. Any help? Link to comment https://forums.phpfreaks.com/topic/239084-how-to-make-latest-comments-appear-first/ Share on other sites More sharing options...
fugix Posted June 11, 2011 Share Posted June 11, 2011 If you are using a database to store your comments, which I assume that you are, when querying them for display, you can order them by the unique key desc. Expample mysql_query("select * from comments order by id desc"); Link to comment https://forums.phpfreaks.com/topic/239084-how-to-make-latest-comments-appear-first/#findComment-1228393 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.