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_LATIT

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 Z

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

2003-01-12 Thread John W. Holmes
zung 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 co

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

2003-01-10 Thread Hutchins, Richard
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 on PHP page to create forms for users to input field names: >

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 "Choose date

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

2003-01-10 Thread John W. Holmes
Are you sure $date and $host have a value? Is register globals on or off? Echo your query to the screen before you execute it to make sure it's what you think it is. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > ---