[ic] OR search on subcategories

Mike Heins mikeh@minivend.com
Wed, 6 Dec 2000 20:16:26 -0500


Quoting John Nealy (jnealy@symetrek.com):
> I upgraded to 4.6.1 and still cannot do OR searches using the code you gave below.  I
> used the RPM verison, should I have gottrn the tarball?  Or is this still in the works to
> be fixed?

It would have been nice if you quoted the code and said what results you
got with each snippet. 

(I hate the "message at the bottom" quoting method, by the way.  How are
 people supposed to get context quickly? I bet I miss many messages I
 might reply to because of quoting like this. )

You need the os=yes parameter -- I don't think I got that in the search
spec. I won't go further because there isn't enough info to do so.

> 
> Mike Heins wrote:
> 
> > Quoting John Nealy (jnealy@symetrek.com):
> > > I want to do an OR search of this sort:
> > > An accessory item may have a subcategory of All if it is common to all
> > > product lines, or a specific name (e.g. Motorola) if it is for only a
> > > specific line.  I am trying to code the complex search so that when I
> > > click a Motorola link on the page I do a search for items in the
> > > accessories category whose subcategory is either All or Specific.  I
> > > have played with combinations of the os=yes tag, but I'm not getting
> > > things quite right.
> > > I never used Minivend so I'm just now learning the tags.
> >
> > Two ways to do it:
> >
> > 1. Using SQL, formulate a SQL query and use the [query] tag.
> >
> >   [query list=1
> >     sql="select * from products
> >          where subcategory = 'All'
> >          or subcategory like 'Motorola'
> >         "] [sql-code] [/query]
> >
> > 2. Use Minivend search terms in the text search.
> >
> > [loop search="
> >         fi=products.txt
> >         co=yes
> >         sf=subcategory
> >         se=All
> >         op=eq
> >
> >         sf=subcategory
> >         se=Motorola
> >         op=rm
> >
> >         rf=*
> >         "] [loop-code] [/loop]
> >
> > In fact, if you do:
> >
> > [loop search="
> >     sq=select * from products where subcategory = 'All' or subcategory like 'Motorola'
> >         "] [/loop-code] [/loop]
> >
> > it will translate exactly to the above.
> >
> > Currently, the DbSearch has some bugs that are in the 4.6.0 release but
> > are resolved in CVS. They would prevent the above from working with st=db.
> >
> > --
> > Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
> > phone +1.513.523.7621 fax 7501 <heins@akopia.com>
> >
> > Light travels faster than sound. This is why some people appear bright
> > until you hear them speak. -- unknown
> >
> > _______________________________________________
> > Interchange-users mailing list
> > Interchange-users@www.minivend.com
> > http://www.minivend.com/mailman/listinfo/interchange-users
> 
> 
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@www.minivend.com
> http://www.minivend.com/mailman/listinfo/interchange-users

-- 
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <heins@akopia.com>

Clothes make the man.  Naked people have little or no influence on
society.  -- Mark Twain