select DISTINCT dates from mysql table
I want to select the DISTINCT dates (ignore开发者_开发百科 time) from the table; then for each date, I want to select all data for that date?
Don't execute a query for each date, rather you should do something like:
SELECT DATE(date_column), other_column FROM your_table ORDER BY DATE(date_column)
And when you are processing your result set pay attention to whether the date result has changed.
This way you only dispatch one query.
精彩评论