Re: Searching for (field1 OR field2) AND field3

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 26959
interpreted = N
texte = At 12:17 AM -0600 2000/02/03, Bob Minor wrote:>On 2/3/00 12:00 AM, Chuck Rice wrote: > >>So if checkbox 1 and 3 are checked, then I want to say: >> >> if ((tree1 NE [blank] OR tree3 NE blank) AND (First EQ Trevor)) then >>show the record. >> >>likewise, if only checkbox 2 is checked, then I want to say: >> >> if ((tree1 NE [blank]) AND (Last EQ Trevor)) then show the record. > >The problem with your theory is that sometimes tree1 doesn't exist as is >the case with the other 3. What are the actual fields in the database? >Why the cryptic underscore before each entry? The fields are (from the header)SKU RTREE CTREE HTREE FIRST MIDDLE LAST KIDS STREET1 STREET2 CITY STATE ZIP FPHONE COMPANY OTHER HPHONE WPHONE CLASSIFICATION MOVE FIRSTLAST PPHONE CPHONE BIRTHDAY WEBSITE EMAIL LUPDATE PTREE The underscores are from the code generated by the DataBase Helper which I used as a starting point. (I am kind of new to WebCat). The search in results.tpl is [search db=ABook.db&[formvariables name=_&exact=F][getchars start=2][name][/getchars]=[url][value][/url]&[/formvariables]startat=[ startat]]I chose this method because of DBHelper. I assumed that it would point me in the right direction.> >
>> >> >> >> >> >>Search: >> > >Rice
>>Higdon
>>Cox
>>Polansky
>> >> >> >> >> >> >> > >[search db=your.db[showif [_tree1]!]&[_Tree1]=[blank][/showif][showif >[_tree2]!]&[_Tree2]=[blank][/showif][showif >[_tree3]!]&[_Tree3]=[blank][/showif][showif >[_tree4]!]&[_Tree4]=[blank][/showif]&max=[_max]&startat=[startat]] >[founditems] >[/founditems] >[/search] > >This is a contextual search based on your query data I don't know what >the rest of the input info is for so I didn't use it. But in the case >above if they check any of the fields above it will add it to the search >context if not it will not. So if 1 & 3 were checked it would search both >1 and 3 for blanks, those that matched both would be returned first, >those that matched only 1 or 3 would come next. > >So no grouping was required I am sure that you could force a grouping and >have it work, but I don't know why you would need to. >Thanks for your help. I may have to go to an explicit search as you show, but using the [Formvariables][/formvariables] syntax allows me to pass in different search info from various places without a million showifs so it would be preferred. But if it will not work, then it will not work and showif it is. -Chuck-__________________________________________________________________________ Chuck Rice ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Associated Messages, from the most recent to the oldest:

    
  1. Re: Searching for (field1 OR field2) AND field3 (Chuck Rice 2000)
  2. Re: Searching for (field1 OR field2) AND field3 (Chuck Rice 2000)
  3. Re: Searching for (field1 OR field2) AND field3 (Bob Minor 2000)
  4. Re: Searching for (field1 OR field2) AND field3 (Chuck Rice 2000)
  5. Re: Searching for (field1 OR field2) AND field3 (Bob Minor 2000)
  6. Re: Searching for (field1 OR field2) AND field3 (Chuck Rice 2000)
  7. Re: Searching for (field1 OR field2) AND field3 (Bob Minor 2000)
  8. Searching for (field1 OR field2) AND field3 (Chuck Rice 2000)
At 12:17 AM -0600 2000/02/03, Bob Minor wrote:>On 2/3/00 12:00 AM, Chuck Rice wrote: > >>So if checkbox 1 and 3 are checked, then I want to say: >> >> if ((tree1 NE [blank] OR tree3 NE blank) AND (First EQ Trevor)) then >>show the record. >> >>likewise, if only checkbox 2 is checked, then I want to say: >> >> if ((tree1 NE [blank]) AND (Last EQ Trevor)) then show the record. > >The problem with your theory is that sometimes tree1 doesn't exist as is >the case with the other 3. What are the actual fields in the database? >Why the cryptic underscore before each entry? The fields are (from the header)SKU RTREE CTREE HTREE FIRST MIDDLE LAST KIDS STREET1 STREET2 CITY STATE ZIP FPHONE COMPANY OTHER HPHONE WPHONE CLASSIFICATION MOVE FIRSTLAST PPHONE CPHONE BIRTHDAY WEBSITE EMAIL LUPDATE PTREE The underscores are from the code generated by the DataBase Helper which I used as a starting point. (I am kind of new to WebCat). The search in results.tpl is [search db=ABook.db&[formvariables name=_&exact=F][getchars start=2][name][/getchars]=[url][value][/url]&[/formvariables]startat=[ startat]]I chose this method because of DBHelper. I assumed that it would point me in the right direction.> > >> >> >> >> >> >>Search: >> > >Rice
>>Higdon
>>Cox
>>Polansky
>> >> >> >> >> >> >> > >[search db=your.db[showif [_tree1]!]&[_Tree1]=[blank][/showif][showif >[_tree2]!]&[_Tree2]=[blank][/showif][showif >[_tree3]!]&[_Tree3]=[blank][/showif][showif >[_tree4]!]&[_Tree4]=[blank][/showif]&max=[_max]&startat=[startat]] >[founditems] >[/founditems] >[/search] > >This is a contextual search based on your query data I don't know what >the rest of the input info is for so I didn't use it. But in the case >above if they check any of the fields above it will add it to the search >context if not it will not. So if 1 & 3 were checked it would search both >1 and 3 for blanks, those that matched both would be returned first, >those that matched only 1 or 3 would come next. > >So no grouping was required I am sure that you could force a grouping and >have it work, but I don't know why you would need to. >Thanks for your help. I may have to go to an explicit search as you show, but using the [formvariables][/formvariables] syntax allows me to pass in different search info from various places without a million showifs so it would be preferred. But if it will not work, then it will not work and showif it is. -Chuck-__________________________________________________________________________ Chuck Rice ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Chuck Rice

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

RePost: NAT and the CART (1999) Trouble with formula.db (1997) Just Testing (1997) FlushDatabases (2000) All questions are welcome on this list (1997) Shopping cart not being assigned (1999) [format 40s]text[/format] doesn't work (1997) LOG IN LOG OUT (1997) Location of Browser Info.txt file (1997) WebCat2 - many [carts] on one template page? (1997) Sku numbers (1997) [WebDNA] CORRECTION: 60% failure rate using replace in a loop (2010) Error reading data -1 (1997) Developers in Washington State (2004) Further tests with the infamous shipCost (1997) sort by day of week... (2003) Req: Array Tags Explained, simple and clear (2003) Problems getting parameters passed into email. (1997) redirect with frames (1997) SET (1998)