Re: OK SQL experts...

From: Date: Sun, 25 Apr 2004 14:51:02 +0000
Subject: Re: OK SQL experts...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-184562@lists.php.net to get a copy of this message
I think you want to remove the single quotes around the field names. SELECT * FROM my_table WHERE (field_1 LIKE '%$keyword%' OR field_2 LIKE '%$keyword%' OR field_3 LIKE '%$keyword%') AND status = 'active'; >>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

« previous php.general (#184562) next »