tgmd Posted July 13, 2006 Share Posted July 13, 2006 I have a Mysql data base. I have several entry's that are all organized by time (standard way mysql inserts it, it looks something like 20060711123751 (year, month, day, hours, minutes, seconds) all in one string. Now I need to print all of these out (let's say there's three of them) by date (earliest one first). I need to know if there's a PHP or Mysql funtion for this. Any help would be greatly appreciated thanks in advance. Link to comment https://forums.phpfreaks.com/topic/14443-organize-content-by-date-php-and-mysql/ Share on other sites More sharing options...
meman1188 Posted July 13, 2006 Share Posted July 13, 2006 i don't know of a way to do it in PHP, but you can ORDER your mysql query and have it return the dates in any order you like. Hope this helps.ex query: SELECT * FROM `table` ORDER BY `DATE (field)` ASC-- Brady Link to comment https://forums.phpfreaks.com/topic/14443-organize-content-by-date-php-and-mysql/#findComment-57127 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.