When echoing out a table, for some reason the last result entered isn't shown. Once another result has been entered, the previously unseen one appears but the newly entered one doesn't. It always seems to lag 1 behind.
Here is my code to take a peek at -
<?php
error_reporting(E_ALL);
//Connect & select.
$con = mysql_connect("localhost","orly?","amirite?");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("jsoftwa1_LeagueSQL", $con);
//Get results.
$result = mysql_query("SELECT * FROM Scoring_Log ORDER BY resultID DESC LIMIT 100") or die(mysql_error());
//echo mysql_num_rows($result);
$row=mysql_fetch_array($result, MYSQL_BOTH);
//print_r($row);
echo "<table border='0' bgcolor='#DBB540'>
<tr>
<th><h1>Result ID |</h1></th>
<th><h1> League |</h1></th>
<th><h1> Player 1 |</h1></th>
<th><h1> Player 2 |</h1></th>
<th><h1> Player 3 |</h1></th>
<th><h1> Player 4 |</h1></th>
<th><h1> Player 5 |</h1></th>
<th><h1> Player 6 |</h1></th>
<th><h1> Player 7 |</h1></th>
<th><h1> Player 8 |</h1></th>
<th><h1> Player 1 Points |</h1></th>
<th><h1> Player 2 Points </h1></th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td><h4>" . $row['resultID'] . "</h4></td>";
echo "<td><h4>" . $row['LeagueName'] . "</h4></td>";
echo "<td><h4>" . $row['1stPlayer'] . "</h4></td>";
echo "<td><h4>" . $row['2ndPlayer'] . "</h4></td>";
echo "<td><h4>" . $row['3rdPlayer'] . "</h4></td>";
echo "<td><h4>" . $row['4thPlayer'] . "</h4></td>";
echo "<td><h4>" . $row['5thPlayer'] . "</h4></td>";
echo "<td><h4>" . $row['6thPlayer'] . "</h4></td>";
echo "<td><h4>" . $row['7thPlayer'] . "</h4></td>";
echo "<td><h4>" . $row['8thPlayer'] . "</h4></td>";
echo "<td><h4>" . $row['1stPoints'] . "</h4></td>";
echo "<td><h4>" . $row['2ndPoints'] . "</h4></td>";
echo "</tr>";
}
echo "</table>";
//Close connection.
mysql_close($con);
?>
Any help is appreciated.