Re: Checking two required fields

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 18675
interpreted = N
texte = >> >> SALUTATION: >> >> CONTACT: >> >> >> >> How would I request that both SALUTATION and CONTACT field match each input >> >> exactly in a search request before returning only the db record containing >> >> each? >> >> >Your syntax is correct; just ditch the _s before the eqs and it should >> >work. >> >> That's fine; he's setting it up for the real search on the next page using >> form variables to collect anything starting with _>I'm not getting the point of this syntax. Wouldn't the _s screw up >everything?Normally yes it would, because usually when you're creating variables that look something like these -- but *without* the leading _ character -- it's because you're sending a search command directly from the form itself. But in this case the leading _ characters would prevent a search command in the form from working properly (as you have recognized) so we have to assume that he's passing these variables to the next page so they can be used in a search context.>And what does [formVariables] have to do with it?On the next page, he's probably using a technique like the following. I've broken this down into separate lines for better visual clarity, but in reality all the WebDNA code here must appear on one line without any carriage returns:[search db=xxx.db [formvariables] [showif [value]~_] &[name]=[getchars start=2][value][/getchars] [/showif] [/formvariables] ]Basically it's a method useful for separating the formvariables you *want* included the search from the ones you do NOT want in the search.Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Associated Messages, from the most recent to the oldest:

    
  1. Re: Checking two required fields (Terry Wilson 1998)
  2. Re: Checking two required fields (Kenneth Grome 1998)
  3. Re: Checking two required fields (Gil Poulsen 1998)
  4. Re: Checking two required fields (Terry Wilson 1998)
  5. Re: Checking two required fields (Kenneth Grome 1998)
  6. Re: Checking two required fields (Gil Poulsen 1998)
  7. Checking two required fields (The Mooseman 1998)
>> >> SALUTATION: >> >> CONTACT: >> >> >> >> How would I request that both SALUTATION and CONTACT field match each input >> >> exactly in a search request before returning only the db record containing >> >> each? >> >> >Your syntax is correct; just ditch the _s before the eqs and it should >> >work. >> >> That's fine; he's setting it up for the real search on the next page using >> form variables to collect anything starting with _>I'm not getting the point of this syntax. Wouldn't the _s screw up >everything?Normally yes it would, because usually when you're creating variables that look something like these -- but *without* the leading _ character -- it's because you're sending a search command directly from the form itself. But in this case the leading _ characters would prevent a search command in the form from working properly (as you have recognized) so we have to assume that he's passing these variables to the next page so they can be used in a search context.>And what does [formvariables] have to do with it?On the next page, he's probably using a technique like the following. I've broken this down into separate lines for better visual clarity, but in reality all the WebDNA code here must appear on one line without any carriage returns:[search db=xxx.db [formvariables] [showif [value]~_] &[name]=[getchars start=2][value][/getchars] [/showif] [/formvariables] ]Basically it's a method useful for separating the formvariables you *want* included the search from the ones you do NOT want in the search.Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Kenneth Grome

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:

Bug? (1997) Alternating colors (1997) Trouble with Netscape (1998) Help name our technology! (1997) OUTSIDE LINKS TO SHOW SHOPPING CART????????? (1998) Navigator Parsing (1997) Location of Browser Info.txt file (1997) [OT] ISP Windows program (2005) [WebDNA] Combining searches with blank and zero values? (2011) Checkboxes on forms?? (1998) [OT] Theiving B*****ds (2004) ODBC-Interface (2000) another database converted to WebDNA (1999) WebCat editing, SiteGuard & SiteEdit (1997) Subtotal Not Calculated on Invoice.html (1998) Running _every_ page through WebCat ? (1997) Search in 2 or more catalogs (1997) [WebDNA] Scripts directory - IIS 5 and WebDNA 6.2 (2011) Shopping with Accounts (2003) remotely add + sign (1997)