Re: Why is this query killing me?
| From: | Jeff Lewis | Date: | Wed, 17 Oct 2001 17:55:08 +0000 |
| Subject: | Re: Why is this query killing me? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-71367@lists.php.net to get a copy of this message | ||
When I was leaving a space it was returning results like:
carpets, caring etc when we're only trying t get the words themselves. So
this wahy w're grabbing the word car with a space on either side :)
The problem we're having though is with case and multiple search keywords.
Jeff
----- Original Message -----
From: "Alex Shi" <chpshi@netvigator.ca>
To: "Jeff Lewis" <jeff@hyrum.net>; <php-general@lists.php.net>
Sent: Wednesday, October 17, 2001 1:52 PM
Subject: Re: [PHP] Why is this query killing me?
> Why you leave a space between the keyword and '%' on each side of it ?
>
> Alex
>
> ----- Original Message -----
> From: "Jeff Lewis" <jeff@hyrum.net>
> To: <php-general@lists.php.net>
> Sent: Wednesday, October 17, 2001 1:45 PM
> Subject: [PHP] Why is this query killing me?
>
>
> I am creating an advanced search with PHP and pulling from mySQL and here
is
> an example of a query I have built:
>
> SELECT pub, class, startdate, adtext FROM classifieds WHERE (pub='KWR' OR
> pub='GUE') AND (startdate<'17-Oct-01') AND ( adtext LIKE '% German
> %' OR
> adtext LIKE '% car %');
>
> Now with this, it returns an ad about German sheppard pups but doesn't
> return any of the dozens of ads about cars. Now if I use german in lower
> case it won't return the German Sheppard pups ad as well!!
>
> What am I doing wrong?
>
> Jeff
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>