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:>
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:
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:>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:
many-to-one problem (1998)
RequiredFields notes ... (1997)
WC2b15 File Corruption (1997)
WebCat2 beta 11 - new prefs ... (1997)
Freeze (2003)
5.0 Pricing (2003)
5.0 Pricing (2003)
Webcatalog [blank] Problem (1999)
MacAuthorize hub, no modal password dialog? (1997)
Date Help (2004)
Support ?? (1997)
Apache 2.0 incompatible? (2005)
Dismissing dialogs (was 2.1b3 --> way slow) (1997)
HELP WITH DATES (1997)
using showpage and showcart commands (1996)
Sending & and other chars thru an append context (2002)
PIXO support (1997)
PIXO support (1997)
Order not created error (1997)
Export database record - append to other database (2005)