I have a mysql table with a column of date_modified and a timestamp set with a default value of the current timestamp. When I insert into the table I get a timestamp. How would one order by the latest timestamp when showing the records in a php script?
Share
Your SQL query would use an
ORDER BYstatement. Then your PHP script can loop through them normally to display them in the proper order.To show them in chronological order:
Most recent first: