Page 1 of 1

PHP news board in order

Posted: Sun Jan 18, 2004 12:46 pm
by TMLewiss
Ok i have a mySQL database and a php page that dispalys news from the SQL database. how do I order it by date.... Thanks in advance for the help

Posted: Sun Jan 18, 2004 2:52 pm
by patrikG
if the column in your database is called "date" the add to the mySQL statement "ORDER BY date ASC".

Posted: Sun Jan 18, 2004 3:07 pm
by vigge89
or else you could have a id-field, which auto increments on each insert, and then order the results by that

just a tip ;)