RE: [PHP] OK SQL experts...

From: Date: Fri, 23 Apr 2004 15:55:15 +0000
Subject: RE: [PHP] OK SQL experts...
Groups: php.general 
Request: Send a blank email to php-general+get-184416@lists.php.net to get a copy of this message
>>> 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'; Why don't you try rebuilding the query. I mean go into phpmyadmin and issue select * from my_table if that works. Then add on one where clause Select * FROM my_table WHERE (`field_1 LIKE '%key%' ) , and just put it back together piece by piece until it breaks. That should at least help narrow down what is breaking.

« previous php.general (#184416) next »