[PHP-DB] PHP and Mysql help

2005-04-24 Thread ReClMaples
Can someone help me out with an issue I'm having? Here is my code: $res = mysql_query(SELECT ZG_LATITUDE, ZG_LONGITUDE FROM zip_code wherezg_zipcode = '$zip'); List($Lat,$Lon) = mysql_fetch_row($res); $Lat1 = ($Lat-2); $Lat2= ($Lat+2); $Lon1= ($Lon-2); $Lon2= ($Lon+2); //echo ($Lat1);

Re: [PHP-DB] PHP and Mysql help

2005-04-24 Thread Colin Busby
Hey, That is a lot of code, so I only skimmed it, but right off the bat i noticed that you are missing a space in between WHERE and zg_zipcode, as shown below: $res = mysql_query(SELECT ZG_LATITUDE, ZG_LONGITUDE FROM zip_code wherezg_zipcode = '$zip'); should be: $res = mysql_query(SELECT

Re: [PHP-DB] PHP and Mysql help

2005-04-24 Thread Amos Glenn
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 =

RE: [PHP-DB] PHP and mySQL help!

2003-01-12 Thread John W. Holmes
Nguyen [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 1:33 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] PHP and mySQL help! Thanks for the quick reply! Perhaps I should describe my problem more specifically so that u could have a better idea: The code

[PHP-DB] PHP and mySQL help!

2003-01-10 Thread Dzung Nguyen
Hi! I have a PHP page with a few text areas where users can enter different combination of fields to query a mySQL database. An example of a query would be like this: $query = SELECT build_ids.build_id, build_ids.username, build_ids.host, build_ids.configuration,

RE: [PHP-DB] PHP and mySQL help!

2003-01-10 Thread John W. Holmes
/ -Original Message- From: Dzung Nguyen [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 12:45 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP and mySQL help! Hi! I have a PHP page with a few text areas where users can enter different combination of fields to query a mySQL

Re: [PHP-DB] PHP and mySQL help!

2003-01-10 Thread Dzung Nguyen
Thanks for the quick reply! Perhaps I should describe my problem more specifically so that u could have a better idea: The code on PHP page to create forms for users to input field names: $tempdate = $date ; $tempselect = $select ; echo font size=$fontsize-1Choose datebr/font form

RE: [PHP-DB] PHP and mySQL help!

2003-01-10 Thread Hutchins, Richard
: Re: [PHP-DB] PHP and mySQL help! Thanks for the quick reply! Perhaps I should describe my problem more specifically so that u could have a better idea: The code on PHP page to create forms for users to input field names: $tempdate = $date ; $tempselect = $select ; echo font size