Re: stubborn mysql problem

From: Date: Fri, 18 Aug 2000 18:44:53 +0000
Subject: Re: stubborn mysql problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12518@lists.php.net to get a copy of this message
If your mls column is an integer of some kind, then you need to get rid of the apostrophes around $mls in your SELECT statement. Doug Dusty Cohen was heard at 01:28 PM 8/18/00 EDT to say: >I must be missing something simple here, but I can't get this to work. >Anybody see anything wrong here?: > >$result = mysql_query("SELECT title, bed, bath, halfbath, price, > address1, address2, story, features > FROM $area WHERE mls = '$mls'") > or die(mysql_error()); > >If I send the variable '723361'(for example) I get the message: > >You have an error in your SQL syntax near 'WHERE mls = '723361'' at line 3 > >There IS a column mls, and there IS an entry for 723361, so it's not the >obvious "does that exist?" problem. I'm stumped. Any ideas? Thanks in >advance. >Dusty >

« previous php.general (#12518) next »