Re: OK SQL experts...

From: Date: Fri, 23 Apr 2004 16:42:17 +0000
Subject: Re: OK SQL experts...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-184428@lists.php.net to get a copy of this message
* Thus wrote Brian Dunning (brian@briandunning.com): > 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'; You might want to change your subject to 'mind reading experts'. A lot of things can be wrong with this, as per the whole discussion on this topic has shown. All you need to do is echo mysql_error() and echo the actual string that you are passing to mysql_query(). You're problem will be solved rather quickly if you do that. Curt -- "I used to think I was indecisive, but now I'm not so sure."

« previous php.general (#184428) next »