[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [ic] OR search on subcategories
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?
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