Display data by date
Posted: Fri Aug 01, 2008 8:29 am
Hi all! Not sure this belongs here but I think it does.
Ok so I have a database to store the results and dates of matches. The database is like this:
HTeam HScore ATeam AScore Date
I can display my data by date like this so far:
07-08-2008 Team A 12 - 3 Team B
07-07-2008 Team C 12 - 3 Team D
07-06-2008 Team E 12 - 3 Team F
07-07-2007 Team G 12 - 3 Team H
06-07-2006 Team I 12 - 3 Team J
07-07-2005 Team K 12 - 3 Team L
07-07-2004 Team M 12 - 3 Team N
As you can see my dates are already in DESC order, but I want to have some code that will display the matches in groups by their date. For example if 3 matches were played on 02-03-2005 and 2 matchs were displayed on 22-07-2008 it would display like this:
22-07-2008
Team G 12 - 3 Team H
Team I 12 - 3 Team J
02-03-2005
Team A 12 - 3 Team B
Team C 12 - 3 Team D
Team E 12 - 3 Team F
Any help would be much appreciated as this is driving me crazy!!
Ok so I have a database to store the results and dates of matches. The database is like this:
HTeam HScore ATeam AScore Date
I can display my data by date like this so far:
07-08-2008 Team A 12 - 3 Team B
07-07-2008 Team C 12 - 3 Team D
07-06-2008 Team E 12 - 3 Team F
07-07-2007 Team G 12 - 3 Team H
06-07-2006 Team I 12 - 3 Team J
07-07-2005 Team K 12 - 3 Team L
07-07-2004 Team M 12 - 3 Team N
As you can see my dates are already in DESC order, but I want to have some code that will display the matches in groups by their date. For example if 3 matches were played on 02-03-2005 and 2 matchs were displayed on 22-07-2008 it would display like this:
22-07-2008
Team G 12 - 3 Team H
Team I 12 - 3 Team J
02-03-2005
Team A 12 - 3 Team B
Team C 12 - 3 Team D
Team E 12 - 3 Team F
Any help would be much appreciated as this is driving me crazy!!