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 Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.