Re: PHP and Mysql help

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

 



ReClMaples wrote:

$zipcode = mysql_query(

"SELECT * FROM zip_code where ZG_LATITUDE >= $Lat1

and ZG_LATITUDE <= $Lat2 and ZG_LONGITUDE >= $Lon1 and ZG_LONGITUDE <=

$Lon2");

Try putting single quotes around the variables in your query string; mysql sees them as strings, not variables:

... ZG_LATITUDE >= '$Lat1' and ZG_LATITUDE <= '$Lat2' ...

-Amos

--
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