i have a script that takes the system name from each row, displays it, then shows the correct games under the system.
however, i can't get it to alphabetize the games under the system.
does anybody see whats going on with this code:
// sql, etc
echo "<table border=0 width=100% cellpadding=3 cellspacing=1 bgcolor=#000000>";
$i=0;
$sql = "SELECT * FROM mygames WHERE userName = '$loginuser' ORDER BY system";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
extract($row);
$area=$system;
if ($TempArea <> $system) {
include("$basedir/includes/nrg_systemnames.php");
echo "<tr><td colspan=2 bgcolor=#7B8EC6><font class='text'><B>$systemname</B></font></td></tr>";
$TempArea = $area ;
}
echo "<tr><td bgcolor=#FFFFFF><font class='text'>$gameTitle</font></td><td bgcolor=#FFFFFF><font class='textsmall'>remove</font></td></tr>\n";
}
echo "</table>";
}
Any help is greatly appreciated. Thanks guys.