RE: mysql field not resolving comaparison condition for zip code locator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> I am having trouble implementing a zip code locator program. All of the
> functions work correctly but the $sql variable.
> The problem occurs by using the latitude argument as a
> comparison. The first
> latitude argument works but when the second
> latitude argument is added the query returns no data. Here is an
> example of
> the $sql variable being used.
>
> $sql=SELECT City FROM ZIPCodes WHERE
>    Latitude <= 122.02671343318
>               AND Latitude >= 121.96888656682
>    AND Longitude >= 37.617091284671
>    AND Longitude <= 37.508048715329;
>

I think Latitude only goes to 90, so they are all under 122 and none are
above 121.  Also, you aren't going to get something that is greater than
37.6 but less than 37.5

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux