Hi,
I'm searching for an exact match of "ready maria". So I'm using the double quotes to 
demarcate the exact search, as per MySQL rules. I'm not searching for the double 
quotes.
John


Van Andel wrote:

> One question that comes up is why are you putting the double quotes around the 
>search string ready maria?  Should there be an entry in the database that includes 
>the double quotes.  Right now that is what your sql statement is looking for.  So an 
>entry like this
>
> Are you ready maria?
>
> Would not be found but an entry like
>
> The book "ready maria" is great
>
> Would return something.
>
> Robbert van Andel
>
> -----Original Message-----
> From: John Taylor-Johnston [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 04, 2002 9:33 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Sigh :)
>
> Hi,
>
> Can someone take a look at this again, please?
>
> http://news.php.net/article.php?group=php.general&article=126934
>
> Your posts so far have proven fruitless. Thanks for trying. :) I do appreciate it.
>
> I will try to answer everyone at the same time.
>
> Someone mentionned it might be a problem with magic_quotes, but I didn't really 
>follow.
>
> http://news.php.net/article.php?group=php.general&article=126990
>
> I did test what he suggested:
>
> >From John Holmes
> > try this
>
> Doesn't work. :) Thanks. I did try:
>
> $sql = "SELECT id,AU,ST,BT,AT FROM $table WHERE MATCH 
>(TNum,YR,AU,ST,SD,BT,BC,AT,PL,PR,PG,LG,AUS,KW,GEO,AN,RB,CO) AGAINST ('".$search."' IN 
>BOOLEAN MODE) ORDER BY id asc";
>
> It echos:
>
> ('\"ready maria\"' IN BOOLEAN MODE)
>
> It should echo:
>
> ('"ready maria"' IN BOOLEAN MODE)
>
> for it to work. But even if I add slashquotes, it won't do it.
>
> 
>--------------------------------------------------------------------------------------------------------------
> >could you get the error message with mysql_error() and post it here?
>
> There is no error. I wish there was :) Thanks for trying.
>
> >Doesn't work - Resembles +ready +maria
> >hmm - how do you get your string "ready maria"?
>
> <input name=search>
>
> >why '.$table.' and not '".$table."'
> >with what you've got now, I believe you are looking for table name.
>
> Good idea. Done that. Doesn't change . :) Thanks.
>
> >also, use double quotes for start and end of variables as in:
> >$sql="select * from '".$table."' where var='some
> >value other than a number' ";
>
> Doesn't work. :) Thanks.

Reply via email to