| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Grouping data by date
I have some team fixtures and results in a database and am trying to group them by date.
The code I'm using is as follows: sql = "SELECT Date, HomeTeam, HomeScore, AwayTeam, AwayScore FROM tblFixtures ORDER BY Date DESC" set result = myconn.execute(sql) if not result.EOF then response.write("<table border=0><tr bgolor=#006633><th><div align=left><font color=#FFFF00 size=2 face=frutigerLight>Fixtures & Results<tr><th>") while not result.EOF response.write("<tr><td span=4><div align=left><font size=2 face=frutigerLight>" & result("Date")) Do response.write("<tr><td><div align=left><font size=2 face=frutigerLight>" & result("HomeTeam")) response.write("<td><div align=left><font color=#006633 size=2 face=frutigerLight><strong>" & result("HomeScore")) response.write("<td><div align=left><font color=#000000 size=2 face=frutigerLight>" & result("AwayTeam")) response.write("<td><div align=left><font color=#000000 size=2 face=frutigerLight>" & result("AwayScore")) result.movenext() Loop Until result.EOF result.movenext() wend response.write("</table>") else response.write("<p>No Entry for " & request("place")) end if I get most of the data returned but ungrouped. example result is here. http://www.mellishrfc.co.uk/fixtures.asp |
![]() |
| Viewing: Tutorialized Forums > Web Design & Development > ASP > Grouping data by date |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|