Re: PHP and Mysql help
| From: | Amos Glenn | Date: | Mon, 25 Apr 2005 01:42:27 +0000 |
| Subject: | Re: PHP and Mysql help | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-39270@lists.php.net to get a copy of this message | ||
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