My table structure
id order_id location time date 1 951 x 2/03/2013 2 951 x 13:00 2/03/2013 3 951 y 3/03/2013
I want to show them in php with a group by date something like
Date 2/03/2013 Orderid 951 location x Orderid 951 location x Date 3/03/2013 Orderid 951 location y
Mysql query execution
select * from table where order_id=951 GROUP BY date ORDER BY id ASC
But this query returns only the first row of the same data. How can I show all repetitions in a category by date. how to use it in php to display data, taking the date as a separate variable.
I am editing the question so that you know that the date can be anything, I just want the order identifier to be displayed by the date in the group, including repetition.
source share