Hello,
This one is strange, for some reason the code only echo's 6 out of the 7 rows? This happens no matter how you sort it?
Heres the code
if (!$stats_sort){
$stats_sort = "lname";
}else{}
$sql = mysql_query("SELECT * FROM employee order by $stats_sort asc");
$result = mysql_fetch_array($sql);
if(mysql_num_rows($sql) > 0) {
// If there are rows, make the table
echo "<table width=\"100%\" border=\"0\" cellpadding=\"5\">
<tr>
<td><font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong><a href=\"?stats_sort=lname\">Employee Name</a></strong></font></td>
<td><font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong><a href=\"?stats_sort=last_login\">Last
Login</a></strong></font></td>
</tr>";
while($row=mysql_fetch_array($sql)) {
//
echo "<tr>
<td bgcolor=\"$row_color\"><font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\">".$row['aero_id']." - ".$row['fname']."</font></td>
<td bgcolor=\"$row_color\"><font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\">".$row['last_login']."</font></td>
</tr>";
}
echo "</table>";
//end the table
}
heres the link
http://www.aeroportal.net/pleasehelp/stats.php
as you can see when you click on last login it displays records 1,2,4,5,6,7 and leaves out #3
and when you click on Employee name it displays recods
1,2,3,5,6,7 and leaves out #4
Any ideas? This is driving me crazy.
Chris