Why is this query killing me?
| From: | Jeff Lewis | Date: | Wed, 17 Oct 2001 17:45:07 +0000 |
| Subject: | Why is this query killing me? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-71364@lists.php.net to get a copy of this message | ||
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