RE: [PHP] OK SQL experts...

From: Date: Fri, 23 Apr 2004 17:27:40 +0000
Subject: RE: [PHP] OK SQL experts...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-184437@lists.php.net to get a copy of this message
doesn't look like your $keyword value contains anything. -----Original Message----- From: Brian Dunning [mailto:brian@briandunning.com] Sent: Friday, April 23, 2004 1:19 PM To: php-general@lists.php.net Subject: Re: [PHP] OK SQL experts... On Apr 23, 2004, at 10:13 AM, John Nichel wrote: > Brian Dunning wrote: >> I STFW and RTFM and I still can't figure out why this returns a 1064 >> parse error: >> SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' >> OR >> 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE >> '%$keyword%') AND >> 'status' = 'active'; >> Anyone? TIA! >> - B1ff Lamer > > What does mysql_error() tell you? You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''my_table' WHERE ('field_1' LIKE '%%' OR 'field2' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#184437) next »