Re: mysql field not resolving comaparison condition for zip code locator
| From: | AdminHMO | Date: | Tue, 23 Sep 2003 20:32:11 +0000 |
| Subject: | Re: mysql field not resolving comaparison condition for zip code locator | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-30650@lists.php.net to get a copy of this message | ||
Thanks Jennifer,
I got the query and the zipcode longitude and latitude from the developer of
the zipcode locator. When I contacted them about this issue they had me run
this query in the phpMyAdmin against the zipcode date and I still got no
data returned.
"Jennifer Goodie" <goodie@apollointeractive.com> wrote in message
news:NEBBIJJIKBGCCCNKMPBCOEPGJJAA.goodie@apollointeractive.com...
> >
> > 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