MySQL ORDER BY date and team
- by Michael
I would like to order by date and then team in a MySQL query.
It should be something similar to this:
SELECT * FROM games ORDER BY gamedate ASC, team_id
AND it should output something like this:
2010-04-12 10:20 Game 1 Team 1
2010-04-12 11:00 Game 3 Team 1
2010-04-12 10:30 Game 2 Team 2
2010-04-14 10:00 Game 4 Team 1
So that Team 1 is under each other on the same date, but separate on a new date