RE: [PHP] need help - past deadline
| From: | Jay Blanchard | Date: | Tue, 26 Aug 2003 18:28:55 +0000 |
| Subject: | RE: [PHP] need help - past deadline | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-160835@lists.php.net to get a copy of this message | ||
[snip]
$sql = "SELECT seat, alias FROM attendees";
$sql_result = mysql_query($sql,$connection) or die("Couldn't execute
query.");
$row = mysql_fetch_array($sql_result);
$myseat =
array('70','71','72','73','74','75','76','77','78','79','80','81','82','
83','84');
$i = 70;
foreach ($myseat as $seat)
{
if (($seat) == ($row[0]))
[/snip]
Jay you are not looping through each row as far as I can see. You fetch
the row array once, getting you one seat and one alias. You loop through
the $myseat array against the one row, and I think you should loop
through the $myseat array for each row...right?
Jay