I have a table that I want a,b,c,d,e,f,g,h ,and m for headers and 26 rows. In the values I want to verify against a mysql query. If cell A3 is in the list I want to highlight it yellow (or put an X for simplicity of the post). I can get the results in my table but it's not the correct layout. I'm also am unaware of how to validate for a cell that doesn't exist in the results and skip it so the correct cells are highlighted. Any help would be MUCH appreciated. This one's a little over my head. Thanks.
Here's my current code.
[CODE=PHP] print "<table border=1>";
$x=0;$y = 1;
while ($y <= 26){
$z = 0;
print "<tr>";
while ($z <= 8){
$q = mysql_query("se lect concat(left(row ,1), mid(row,3,2)) as 'binloc' from rows where done = true group by binloc") or die("unable to get query results");
mysql_data_seek ($q,$x);
$row = mysql_fetch_row ($q);
print "<td>".$row[0]."</td>";
$x++;$z++;
}
print "</tr>";
$y++;
}
print "</table>";[/CODE]
Here's my current code.
[CODE=PHP] print "<table border=1>";
$x=0;$y = 1;
while ($y <= 26){
$z = 0;
print "<tr>";
while ($z <= 8){
$q = mysql_query("se lect concat(left(row ,1), mid(row,3,2)) as 'binloc' from rows where done = true group by binloc") or die("unable to get query results");
mysql_data_seek ($q,$x);
$row = mysql_fetch_row ($q);
print "<td>".$row[0]."</td>";
$x++;$z++;
}
print "</tr>";
$y++;
}
print "</table>";[/CODE]
Comment