hassank1 Posted January 12, 2009 Share Posted January 12, 2009 I've a datetime field in mysql (format ex: 2009-01-11 14:32:00 ) so what is the query to select all rows in the table where the date time in the field is less than or equal the current date Note : I also want the time to be compared not only the date Link to comment https://forums.phpfreaks.com/topic/140495-select-where-date/ Share on other sites More sharing options...
Mchl Posted January 12, 2009 Share Posted January 12, 2009 SELECT * FROM table WHERE dateTimeField <= NOW() Link to comment https://forums.phpfreaks.com/topic/140495-select-where-date/#findComment-735198 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.