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

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -