Re: OK SQL experts...

From: Date: Fri, 23 Apr 2004 15:31:08 +0000
Subject: Re: OK SQL experts...
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-184406@lists.php.net to get a copy of this message
AFAIK phpMyAdmin uses backticks for table/field names, not single quotes ... Friday, April 23, 2004, 5:22:35 PM, thus was written: > I tried it both ways - didn't make any difference (phpmyadmin adds the > single quotes when I was trying to use its sql function to debug, so I > figured what the hell)... > On Apr 23, 2004, at 8:27 AM, Edward Peloke wrote: >> why are the table and field names surrounded by single quotes? >> >> -----Original Message----- >> From: Brian Dunning [mailto:brian@briandunning.com] >> Sent: Friday, April 23, 2004 11:19 AM >> To: php-general@lists.php.net >> Subject: [PHP] OK SQL experts... >> >> >> 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 >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> >> > - Brian

« previous php.general (#184406) next »