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:
math a various prices (1997)
Trouble with formula.db (1997)
WebCat2 Append problem (B14Macacgi) (1997)
Help w/Multi User Admins (1997)
Parse question (2005)
Writing to disk (1999)
details (2003)
I'm new be kind (1997)
Why is my easy [AddLineItems] NOT working?? (2000)
Converting Quotes in Javascript (2001)
WebCat with WebTen (1998)
Upload files (2004)
beta 5 - OS X [replacefounditems] syntax & suggestion (2000)
WebCatalog and Dreamweaver (1999)
Test (2008)
Faxing orders in place of email (1997)
OK, here goes... (1997)
[ot] Securing PHP & MySQL (2003)
emailer error type 103 (1997)
[OT] Display Glitch (2004)