RE: [PHP] OK SQL experts...

From: Date: Fri, 23 Apr 2004 15:56:39 +0000
Subject: RE: [PHP] OK SQL experts...
Groups: php.general 
Request: Send a blank email to php-general+get-184419@lists.php.net to get a copy of this message
Brian Dunning <mailto:brian@briandunning.com> on Friday, April 23, 2004 8:19 AM said: > SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR > 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE > '%$keyword%') AND > 'status' = 'active'; have you tried simply: SELECT * FROM my_table WHERE status = 'active'; ?? if that works move up into: SELECT * FROM my_table WHERE (field_1 LIKE '%$keyword%') AND status = 'active'; if that works continue until you get an error. chris.

« previous php.general (#184419) next »