Jump to content

Archived

This topic is now archived and is closed to further replies.

tgmd

Organize Content by Date PHP And MySQL

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.