t_machine Posted December 1, 2008 Share Posted December 1, 2008 Hi, I have a table that stores each record with in a DATETIME column. I was wondering how accurate is it to order by the date column Example $sql = "SELECT * FROM table_name WHERE {get todays result} ORDER BY date_column DESC"; Would an order like that display the results for the day correctly, and would it list the last result for the day first? Thanks for any help Link to comment https://forums.phpfreaks.com/topic/135014-how-to-order-by-time-in-a-day-using-datetime/ Share on other sites More sharing options...
Mchl Posted December 1, 2008 Share Posted December 1, 2008 If it's DATETIME it's accurate to one second. Link to comment https://forums.phpfreaks.com/topic/135014-how-to-order-by-time-in-a-day-using-datetime/#findComment-703186 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.