php - How to group rows and list a certain columns values -


i have table has rows of dates & times. want produce list of times each unique date in table.

here table:

date       time 2000-01-01 09:00:00 2000-01-01 13:00:00 2000-07-18 09:00:00 2000-07-18 13:00:00 2000-12-31 10:31:00 2000-12-31 14:17:00 2000-12-31 21:42:00 

i result set this:

2000-01-01, 09:00:00, 13:00:00 2000-07-18, 09:00:00, 13:00:00 2000-12-31, 10:31:00, 14:17:00, 21:42:00 

is possible?

amended: possible produce result set in 1 query?

2000-01-01, 2000-07-18, 09:00:00, 13:00:00 2000-12-31, 10:31:00, 14:17:00, 21:42:00 

select date, group_concat(time) times yourtable group date 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -