I'm having a devil of a time trying to format the out put of my SQL query ...
This is what I want it to look like (see tables):
http://www.themedallion.net/Washing...es/box0404.html
This is what I'm getting (minus some of the variables):
http://www.themedallion.net/Washing.../listscores.php
I'd like to make each location in it's own table like on the first page. This is the code:
PHP:
<?php
include("dbinfo.inc.php");
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$sql = "SELECT * FROM wabox0404 ORDER BY wa04Location, wa04Date";
$res = mysql_query($sql) or die($sql.' - '.mysql_error());
$lastLocation='';
while($row = mysql_fetch_array($res)) {
if($lastLocation!=$row['wa04Location']) {
echo "<table border=1 align=center width=746 cellpadding=3>\n";
echo "<tr><td bgcolor=#bf7777>\n";
echo($row['wa04Location']."<br />");
$lastLocation=$row['wa04Location'];
echo "</td></tr>\n";
}
echo "</table>\n";
echo "<tr><td>\n";
echo($row['wa04Date']."");
echo "<td>\n";
echo($row['wa04Event']."");
}
?>