Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] HELP ! i cant get this simple search to work



******    message to minivend-users from Chris Rapier <rapier@psc.edu>     ******


> ******    message to minivend-users from "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....

Okay, I'm not sure if this is the best way to do it but it will work.
The first step is to break the search you want down into its components.
You bascially have

if (X && (Y | Z)) 
 then true

It seems to me that all X will be a subset of Y | Z so you could rewrite
that as

if (Y | Z) 
  then if X
     then true

In other words... search on Y or Z and then loop through those results
to see if they match the criteria for X. if they do then do your magic
if not then skip it. Its probably not as efficient as a one line boolean
but it should work.
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: