Re: OK SQL experts...

From: Date: Fri, 23 Apr 2004 15:51:58 +0000
Subject: Re: OK SQL experts...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-184414@lists.php.net to get a copy of this message
phpmyadmin echoes it out exactly as I copied & pasted into my first post. On Apr 23, 2004, at 8:56 AM, Edward Peloke wrote:
if you echo out the query..what is the output? -----Original Message----- From: Brian Dunning [mailto:brian@briandunning.com] Sent: Friday, April 23, 2004 11:36 AM To: php-general@lists.php.net Subject: Re: [PHP] OK SQL experts... 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';
Use backticks around table and column names, not single quotes. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - Brian


« previous php.general (#184414) next »