RE: [PHP] stubborn mysql problem
| From: | Robert Walker | Date: | Fri, 18 Aug 2000 18:06:06 +0000 |
| Subject: | RE: [PHP] stubborn mysql problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-12514@lists.php.net to get a copy of this message | ||
Dusty,
Try:
$result = mysql_query("SELECT title, bed, bath, halfbath, price,
address1, address2, story, features
FROM ".$area." WHERE mls =
'".$mls."'")
or die(mysql_error());
I assume that $area is set...
Robert
-----Original Message-----
From: Dusty Cohen [mailto:dusty351@hotmail.com]
Sent: Friday, August 18, 2000 1:34 PM
To: php-general@lists.php.net
Subject: [PHP] stubborn mysql problem
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
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net