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:

[WebDNA] sem_open solved (2012) sBox (2002) Another bug to squash (WebCat2b13 Mac .acgi) (1997) WebCat2: Found Items syntax, etc. (1997) WebCat2b12 - nesting [tags] (1997) Linux ODBC and the ODBC Bridge (2000) Email Problem (1997) [WebDNA] TCPconnect and Bitcoin rate (2017) Re:no [search] with NT (1997) totals (1997) [showif [getcookie otherDomain]=yes] inside a [TCP connect] will work? (2000) I have troubles to send message out (1998) [WebDNA] why is the webdna.us site slow? (sometimes?) (2011) Emailer or [sendmail] questions ... (1998) WebDNA or WebCatalog4.0.2 on Redhat 7.3 System (2003) OT JavaScript question (1999) target=_blank and form variables (1997) Stopping bad HTML propagation ? (1997) Shopping Cart variation... (1997) 2.0Beta Command Ref (can't find this instruction) (1997)