[ic] OR search on subcategories
Wed, 06 Dec 2000 20:12:04 -0500
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
Mike Heins wrote:
> Quoting John Nealy (firstname.lastname@example.org):
> > 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="
> "] [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 <email@example.com>
> Light travels faster than sound. This is why some people appear bright
> until you hear them speak. -- unknown
> Interchange-users mailing list