Re: OK SQL experts...

From: Date: Sun, 25 Apr 2004 14:55:40 +0000
Subject: Re: OK SQL experts...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-184563@lists.php.net to get a copy of this message
The parenthesis are OK. The query might take a long time to run with 3 LIKE statements. >>Backticks, single quotes, or nothing at all makes no difference. I >>believe the parsing error is due to my parentheses or AND/OR structure. >>Any thoughts on that? >> >> >> >>On Apr 23, 2004, at 8:32 AM, John W. Holmes wrote: >> >>> From: "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';

« previous php.general (#184563) next »