php mysql comments/forum layout

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
birdie
Forum Newbie
Posts: 22
Joined: Thu Sep 15, 2005 4:37 pm

php mysql comments/forum layout

Post by birdie »

hi, ive made a script where php INSERT's data into a table. a table which has "poster" "comment". could anyone please tell me how to echo these results starting from the newest to the last result? use the same kind of layout as a forum if that helps.. o and has timestamps got any use in this? thanks for reading
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

so long as you never delete any records you don't absolutely need a time related field.. to answer your question look into the ORDER BY clause and the DESC (descending) modifier
birdie
Forum Newbie
Posts: 22
Joined: Thu Sep 15, 2005 4:37 pm

Post by birdie »

ok thanks i'll try that
Post Reply