When I query my database with the following in my file, search.php, it only returns the first result it comes across.
$qry = "SELECT business_id FROM business WHERE zip like '%91326%'";
$rs = mysql_query($qry);
$rec = mysql_fetch_array($rs);
echo $session->showContents($rec);
showContents is just a utility function...
function showContents($array)
{
echo "<pre>";
print_r($array);
echo "</pre>";
}
showContents returned this:
Array
(
[0] => 3
[business_id] => 3
)
The crazy thing is, when I put the same query in sqlbuddy it gives me:
business_id
3
5
6
I am at a loss