Re: Searching for (field1 OR field2) AND field3

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 26955
interpreted = N
texte = At 11:04 PM -0600 2000/02/02, Bob Minor wrote:>On 2/2/00 9:12 PM, Chuck Rice wrote: > >>I tried that, but it did not help. I guess I should have explained that I >>have >>four columns in the database (the 4 tree fields) and I want to be able to >>select any or all of the columns to search, AND select any of the other >>fields to search on. -Chuck- > >I don't think you are attacking it right. > >What are you searching for in those fields. > >Explain the form and function in english, then we can try to make it >happen. > >I assume you want to be able to search the Rtree, the Htree, Ctree and >Ptree fields for some value. if R is checked then search Rtree, if H is >checked then Htree etc.... Is this correct? >Sorry, it is kind of hard to explain. There are 4 tree columns in the database. Each record will have one value in at least one of the columns and may have a value in 2, 3 or 4 columns. I want to be able to search only records that have data in one of the checkbox selected columns, ignoring records that have nulls ([blank]) in the checked column. at the same time, I want to search other columns for things link names and dates.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.I found several problems with the code I posted earlier, so here is the revised form:>
> > > > > >Search: > >Rice
>Higdon
>Cox
>Polansky
> > > > >Last: >First: >Address: >City: >State: >Zip: >HPhone: >Birthday: >Email: >Website: > > > > > >
Putting a display of the formvariables in RESULTS.TPL, I get:>&max=5 >&allreqd=T >&Tree1=neRtreedata >&Tree2=neHtreedata >&Tree3=neCtreedata >&Tree4=nePtreedata >&group1field=%5B_Tree3%5D >&negroup1data=%5Bblank%5D >&Lastdata= >&Firstdata=Trevor >&Addressdata= >&Citydata= >&Statedata= >&Zipdata= >&HPhonedata= >&Birthdaydata= >&Emaildata= >&Websitedata=As you see, Tree3 did not get substituted. Hope this explains it better. Like I said, it is a bit hard to put into a short number of words. I think that I need to be setting the groupfield in the Results page, but if I do that, then it is not in the formvariables and other things will break. -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 11:04 PM -0600 2000/02/02, Bob Minor wrote:>On 2/2/00 9:12 PM, Chuck Rice wrote: > >>I tried that, but it did not help. I guess I should have explained that I >>have >>four columns in the database (the 4 tree fields) and I want to be able to >>select any or all of the columns to search, AND select any of the other >>fields to search on. -Chuck- > >I don't think you are attacking it right. > >What are you searching for in those fields. > >Explain the form and function in english, then we can try to make it >happen. > >I assume you want to be able to search the Rtree, the Htree, Ctree and >Ptree fields for some value. if R is checked then search Rtree, if H is >checked then Htree etc.... Is this correct? >Sorry, it is kind of hard to explain. There are 4 tree columns in the database. Each record will have one value in at least one of the columns and may have a value in 2, 3 or 4 columns. I want to be able to search only records that have data in one of the checkbox selected columns, ignoring records that have nulls ([blank]) in the checked column. at the same time, I want to search other columns for things link names and dates.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.I found several problems with the code I posted earlier, so here is the revised form:>
> > > > > >Search: > >Rice
>Higdon
>Cox
>Polansky
> > > > >Last: >First: >Address: >City: >State: >Zip: >HPhone: >Birthday: >Email: >Website: > > > > > >
Putting a display of the formvariables in RESULTS.TPL, I get:>&max=5 >&allreqd=T >&Tree1=neRtreedata >&Tree2=neHtreedata >&Tree3=neCtreedata >&Tree4=nePtreedata >&group1field=%5B_Tree3%5D >&negroup1data=%5Bblank%5D >&Lastdata= >&Firstdata=Trevor >&Addressdata= >&Citydata= >&Statedata= >&Zipdata= >&HPhonedata= >&Birthdaydata= >&Emaildata= >&Websitedata=As you see, Tree3 did not get substituted. Hope this explains it better. Like I said, it is a bit hard to put into a short number of words. I think that I need to be setting the groupfield in the Results page, but if I do that, then it is not in the formvariables and other things will break. -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:

Log-in Scheme (2003) OT: Unix Guru Needed (2003) Replto in [SendMail] (2000) WC1.6 to WC2 date formatting (1997) LookUp Tag (1997) WebCatalog not running after upgrade (2000) Version number missing (was Mondo amounts of Mail [long]) (1999) Payments -> Bank Accounts (2005) WebCatalog for guestbook ? (1997) [UPPERCASE] (1997) Emailer Set Up (1997) Country & Ship-to address & other fields ? (1997) Not really WebCat (1997) Weird WebCatalog problems (1998) More on the email templates (1997) Document Contains No Data! (1997) rotating thumbnails (1997) Tracking System? (1997) b12 cannot limit records returned and more. (1997) WebMerchant MacAuthorize Hub (1999)