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:

Nested search (1997) WebCat2 - [format thousands] (1997) MultiGroupChecker (2000) Server Error Question (2004) [Announce]: Web server security and password protection (1997) customer info (2001) insecuretextvars preference doesn't work (2000) Writing [raw] to a file (2000) FREE Web Server Monitor FREE (1997) Web Catalog 2 demo (1997) RE: Redirect (1998) Help name our technology! (1997) Not sending email !!! (2002) A multi-processor savvy WebCatalog? (1997) Followup question re: checksum for credit cards? (1997) Problems passing [SKU] with $Replace in 2.0 (1997) multiple databases (1997) Help name our technology! I found it (1997) Tech support (2000) Problems with WebDNA-Talk list (1998)