[ic] Trouble with coordinated search to test for inactive

Ron Phipps rphipps at reliant-solutions.com
Wed Apr 7 13:19:59 EDT 2004


> From: Stefan Hornburg
> 
> On Tue, 6 Apr 2004 20:57:45 -0700
> "Ron Phipps" <rphipps at reliant-solutions.com> wrote:
> 
> > Hello,
> >
> > I have the following fields in my products table:
> >
> > sku
> > title
> > short_description
> > long_description
> > import_inactive
> > user_inactive
> >
> > A user would like to search by keyword for the value 'test'.  I
would
> > like to show all products where import_inactive = 0 and
user_inactive =
> > 0 and either sku, title, short_description or long_description
contain
> > "test".  I've tried several different search strings, but have yet
to
> > come up with one which satisfies all of these requirements.  Any
ideas?
> 
> co=1
> sf=import_inactive
> se=0
> op===
> sf=user_inactive
> se=0
> op===
> lf=sku
> ls=%test
> lf=title
> ls=%test
> ....
> 
> Untested, please watch your SQL logfile for the search statement.
> 
> Bye
> 	Racke

Hi Racke,

Thanks for the pointers.  I gave your code a try and came up with the
same thing as my other tests.  The resulting query is WHERE
import_inactive = 0 AND user_inactive=0 AND sku like 'test%' AND title
like 'test%'.  This fails because both sku and title do not contain that
string.  Is it possible to set os (mv_orsearch) for only part of the
search (between the like tests)?  I'm thinking my best bet may be to
just use query for this search page...

Thanks,
-Ron



More information about the interchange-users mailing list