I would like to know how to regroup the results from mysql queries according to date by grouping.
Table Name = Visit_History
I would like to know how to regroup the results from mysql queries according to date by grouping.
Table Name = Visit_History
order first by group, and then by date
SELECT * FROM Visit_History ORDER BY Ref_Num, Ref_Date
You can use ORDER BY
for this ,
SELECT * FROM Visit_History ORDER BY Ref_Num, Ref_Date