Re: Why is this query killing me?

From: Date: Wed, 17 Oct 2001 18:30:35 +0000
Subject: Re: Why is this query killing me?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-71373@lists.php.net to get a copy of this message
Yes because all ads are ended with a space followed by a hyphen. Jeff ----- Original Message ----- From: "DL Neil" <PHPml@DandE.HomeChoice.co.uk> To: "Jeff Lewis" <jeff@hyrum.net>; "Alex Shi" <chpshi@netvigator.ca>; <php-general@lists.php.net> Sent: Wednesday, October 17, 2001 2:21 PM Subject: Re: [PHP] Why is this query killing me? > If "car" is the first or last word in the field would that work? > =dn > > ----- Original Message ----- > From: "Jeff Lewis" <jeff@hyrum.net> > To: "Alex Shi" <chpshi@netvigator.ca>; <php-general@lists.php.net> > Sent: 17 October 2001 18:55 > Subject: Re: [PHP] Why is this query killing me? > > > > 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 > > > > > > > > > > > > > > > -- > > 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 > > > > > > >

« previous php.general (#71373) next »