[ic] How to perform this search .... ?

Mike Heins mikeh@minivend.com
Mon, 9 Oct 2000 10:57:46 -0400


Quoting Tal Hart (TelNET) (tal@telnet.co.il):
> I am trying to make a simple search like this :
> 
> IF _FieldA_ equals X , and _FieldB_ or _FieldC_ equals Y
> 
> When i use the os=yes, than the or is reflected on the first field, which
> should be an AND,
> you see i need to combine AND & OR in the same search....
> 
> how can i do it,
> and i need to do it , in an in-page search....
> 

Have you looked at the "barry" catalog? I think there is a complex search
on the page subcat.html which does this.

<a href="[area href=scan
			arg=|
				co=yes
				sf=category
				se=[data session arg]
				sg=0
				os=0
				op=rm

				sf=subcategory
				se=[item-code]
				sg=1
				os=1
				op=em

				sf=addl_category
				se=[item-code]
				sg=1
				os=1
			|
		]">

Someday, I will make the SQL search parser translate to this from:

	SELECT sku FROM products
	WHERE category = 'arg'
	AND ( subcategory = 'foo' OR addl_category = 'bar')

Though that is a thought -- if you are using SQL you can use [query type=list ...]
to do just that.

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

Friends don't let friends use Outlook. -- Bob Blaylock