Here are the results of the query:
Pauls Place
2004-01-04
...other details
2004-04-01
...other details
2004-04-02
...other details
Brainard\'s Backyard
Pauls Place and Brainard\'s Backyard are locations. I want to list dates and tournaments results by location, by date, by tournament results. What's happening is ... it looks like it works fine on the first location ... but when it jumps to the second location it stops after printing the location name ... I'm stuck on how to generate the same reults as I got for the first location for all the other locations. All information is in a single table.
Here's my code:
<?php
include("dbinfo.inc.php");
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = mysql_query("SELECT wa04Location FROM wabox0404") or die(mysql_error());
while($row = mysql_fetch_array($query))
{
$location[] = $row['wa04Location'];
}
$location = array_unique($location);
$i = 0;
while(array_key_exists($i,$location))
{
echo($location[$i]."<br><br>");
$query2 = mysql_query("SELECT * FROM wabox0404 WHERE wa04Location = '$location[$i]' ORDER BY wa04Date ASC") or die(mysql_error());
while($row2 = mysql_fetch_array($query2))
{
echo($row2['wa04Date']."<br>...other details<br><br>");
}
$i++;
}
?>