What could make a query run fine from the command line and return the expected results, but not return results when run through the page? I get no syntax errors, just a warning for the fetch_array. It all looks good to me, I'm stumped.
I echoed all the variables immediately before the query and they hold the same values that I use from the command line and get results. I also echoed the query itself just to be sure and everything is there.
Here is the query.
$flat=("SELECT C.Latitude, C.Longitude FROM Cities C JOIN Countries Co ON Co.CountryId = C.CountryId JOIN Regions R ON R.RegionId = C.RegionId WHERE C.City = '$city' and Co.Country = '$country' and R.Region='$state'");
while($fr = mysql_fetch_array($flat)){
$lat = $fr['Latitude'];
$long = $fr['Longitude']; }