Re: Tom: [PHP] magic quotes
| From: | Tom Rogers | Date: | Wed, 04 Dec 2002 23:24:21 +0000 |
| Subject: | Re: Tom: [PHP] magic quotes | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-127051@lists.php.net to get a copy of this message | ||
Hi,
Thursday, December 5, 2002, 7:11:20 AM, you wrote:
JTJ> Tom,
JTJ> Sorry for the delay. I have tried your code.
JTJ> SELECT id,AU,ST,BT,AT FROM ccl_main WHERE MATCH
JTJ> (TNum,YR,AU,ST,SD,BT,BC,AT,PL,PR,PG,LG,AUS,KW,GEO,AN,RB,CO) AGAINST ('"ready
JTJ> maria" ' IN BOOLEAN MODE)
JTJ> ORDER BY id asc
JTJ> Without the space, as with addslashes, MySQL won't compute the sql.
JTJ> This is the echo $sql. There is an extra space before the final single quote. Nonetheless,
JTJ> $sql = 'SELECT id,AU,ST,BT,AT FROM '.$table.' WHERE MATCH
JTJ> (TNum,YR,AU,ST,SD,BT,BC,AT,PL,PR,PG,LG,AUS,KW,GEO,AN,RB,CO) AGAINST
JTJ> (\''.clean_search_string($search).'\' IN BOOLEAN MODE) ORDER BY id
JTJ> asc';
JTJ> MySQL still thinks it is receiving A boolean +ready and + maria
JTJ> http://ccl.flsh.usherb.ca/print/index.html
JTJ> I'm just dumbfounded.
Hmmmm a puzzler
add this to the end of the function to clean up that extra space:
$r = substr($r,0,strlen($r)-1);
return $r;
--
regards,
Tom