I have a table within my SQL database which holds news comments posted by users. Each row is identified by 'id' which auto increments when a new comment is made. However when I say select * from $table_name ORDER BY id, it starts with the earlist comment. How can I make it start with the latest comment and work it's way back?
Many thanks,
Stuart
SELECT * FROM $table_name ORDER BY id DESC
SELECT * FROM table ORDER BY id DESC
Cgraz
tee hee
is faster
most people at least my visitors like to see comments, older to newest (like forum sytle), ORDER by id ASC. some people may find it awkward.
everyone has different taste i guess 🙂
Thanks very much guys,