Re: Why is this query killing me?

From: Date: Wed, 17 Oct 2001 18:26:06 +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-71371@lists.php.net to get a copy of this message
Michael, Thanks, that helped clear up the case problem. Now I just have the problem with more than one search term. If I search for german and house together I want all ads returning both terms yet only the ads wth german in them are returned. Jeff ----- Original Message ----- From: "Michael van Bracht" <mvanbracht@intradat.com> To: "Jeff Lewis" <jeff@hyrum.net> Cc: <php-general@lists.php.net> Sent: Wednesday, October 17, 2001 2:06 PM Subject: Re: [PHP] Why is this query killing me? > On Wed, 17 Oct 2001 13:55:08 -0400 "Jeff Lewis" <jeff@hyrum.net> wrote: > > > 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 :) > > > > mysql supports UPPER/LOWER funtions, UPPER/LOWER the sql value and support > the compared value as upper/lower, too. > > SELECT pub, class, startdate, adtext FROM classifieds WHERE (UPPER(pub)='KWR' OR > UPPER(pub)='GUE') AND (startdate<'17-Oct-01') AND ( UPPER(adtext) LIKE > '% GERMAN %' OR > UPPER(adtext) LIKE '% CAR %'); > > > The problem we're having though is with case and multiple search keywords. > > > > Jeff

« previous php.general (#71371) next »