SOLVED
i cant get my tables to display properly, can anyone see the problem
the site: http://csr.awardspace.com/league.php
phpmyadmin screenshot: attached
the code:
Code:
// Get all the data from the "aleague" table
$result = mysql_query("SELECT * FROM aleague ORDER BY total DESC")
or die(mysql_error());
echo "<table border='1'>";
echo "<tr> <th>Name</th> <th>1</th> <th>2</th> <th>3</th> <th>4</th> <th>5</th> <th>Total</th> </tr>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row into a table
echo "<tr><td>";
echo $row['name'];
echo "</td><td>";
echo $row['game1'];
echo "</td></tr>";
echo $row['game2'];
echo "</td></tr>";
echo $row['game3'];
echo "</td></tr>";
echo $row['game4'];
echo "</td></tr>";
echo $row['game5'];
echo "</td></tr>";
echo $row['total'];
echo "</td></tr>";
}
echo "</table>";
?>
Last edited by FutileSoul : 04-11-2007 at 04:38 PM.
|