Hi, the results of my SELECT on my .php page always returns one record short. It displays "There are 3 records." but only 2 will display. (I've verified there are accually 3 records) I've included the code from the .php file: thank you
if ($code==""
$sql = ("SELECT * FROM sites WHERE state='$state'"
elseif ($state==""
$sql = ("SELECT * FROM sites WHERE code='$code'"
else
$sql = ("SELECT * FROM sites WHERE code='$code' AND state='$state'"
//echo($sql);
$result = mysql_query($sql);
if ($myrow = mysql_fetch_array($result))
$num_rows = mysql_num_rows($result);
print "<p><a href=javascript:history.back(1)><font size=1>BACK</font></a></p>";
print "There are $num_rows records.<P>";
print "<table width=100% border=1>\n";
while ($get_info = mysql_fetch_row($result)){
print "<tr>\n";
foreach ($get_info as $field)
print "\t<td> <font face=arial size=1/>$field</font></td>\n";
print "</tr>\n";
}
print "</table>\n";
if ($code==""
$sql = ("SELECT * FROM sites WHERE state='$state'"
elseif ($state==""
$sql = ("SELECT * FROM sites WHERE code='$code'"
else
$sql = ("SELECT * FROM sites WHERE code='$code' AND state='$state'"
//echo($sql);
$result = mysql_query($sql);
if ($myrow = mysql_fetch_array($result))
$num_rows = mysql_num_rows($result);
print "<p><a href=javascript:history.back(1)><font size=1>BACK</font></a></p>";
print "There are $num_rows records.<P>";
print "<table width=100% border=1>\n";
while ($get_info = mysql_fetch_row($result)){
print "<tr>\n";
foreach ($get_info as $field)
print "\t<td> <font face=arial size=1/>$field</font></td>\n";
print "</tr>\n";
}
print "</table>\n";