[ic] OR search on subcategories
Sat, 02 Dec 2000 20:06:54 -0500
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
I am using 4.5.5 on PostgreSQL, so I am using the st=db. I tried putting the Minivend
tags in using tha admin tool, but the search did not work. Do I need to upgrade?