Re: Reporting form..

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 39839
interpreted = N
texte = Chas -You cannot directly perform multiple comparisons within one field in a search. There are a couple ways around this, depending on your situation.If t1, t2, etc, as well as the theme field, are singular words, you could use a word or search like this...[search db=[tRoot]db/theme.db&wothemedata=[t1]+[t2]+[t3]+[t4]+[t5]+[t6]+[t7]&themesumm=T&allreqd=T]If you've got spaces in your values this won't work though, cause if, for example, t2 contained the blues then all theme values containing the would match.Another way that would handle this situation would be to create multiple field groups which each contain only the theme field, and to search each of those field groups once. Note that you don't want allreqd=T in this case, as that would require ALL search comparisons to be true, which would never happen...[search db=[tRoot]db/theme.db&group1field=theme&group2field=theme...&eqgroup1data=[t1]&eqgroup2data=[t2]...]... Also be careful to [url] your t1, t2... values if there is any chance they contain questionable characters, like ampersands.- BrianAt 12:47 PM 11/1/2001, chas wrote: >Hi everyone, > >I'll bet this is pretty simple, could'nt find an example in the archives... > >I'm trying to set up a reporting form for customers > >the form contains fields for [t1] [t2] [t3] etc... > >I want to return the list of hits by searching db.theme >for [t1] [t2] [t3] corresponding info (up to 7 exact matches) > > >t1=[t1] >t2=[t2] >t3=[t3] [!]variables fire fine...[/!] > >[!]====== Search results ======[/!] >[search >db=[tRoot]db/theme.db&eqthemedata=[t1]&eqthemedata=[t2]&eqthemedata=[t3]&eqthemedata=[t4]&eqthemedata=[t5]&eqthemedata=[t6]&eqthemedata=[t7]&themesumm=T&allreqd=T] > >[founditems] > > > > > > > >
[theme][fresh][airtime][composer][affiliation][publisher]
>[/founditems] >[/search] > >Cheers Chas > >------------------------------------------------------------- >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 > >Web Archive of this list is at: http://search.smithmicro.com/ ------------------------------------------------------------- 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 Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Reporting form.. (Brian Fries 2001)
  2. Re: Reporting form.. (Brian Fries 2001)
  3. Reporting form.. (chas@valley.net (chas) 2001)
Chas -You cannot directly perform multiple comparisons within one field in a search. There are a couple ways around this, depending on your situation.If t1, t2, etc, as well as the theme field, are singular words, you could use a word or search like this...[search db=[tRoot]db/theme.db&wothemedata=[t1]+[t2]+[t3]+[t4]+[t5]+[t6]+[t7]&themesumm=T&allreqd=T]If you've got spaces in your values this won't work though, cause if, for example, t2 contained the blues then all theme values containing the would match.Another way that would handle this situation would be to create multiple field groups which each contain only the theme field, and to search each of those field groups once. Note that you don't want allreqd=T in this case, as that would require ALL search comparisons to be true, which would never happen...[search db=[tRoot]db/theme.db&group1field=theme&group2field=theme...&eqgroup1data=[t1]&eqgroup2data=[t2]...]... Also be careful to [url] your t1, t2... values if there is any chance they contain questionable characters, like ampersands.- BrianAt 12:47 PM 11/1/2001, chas wrote: >Hi everyone, > >I'll bet this is pretty simple, could'nt find an example in the archives... > >I'm trying to set up a reporting form for customers > >the form contains fields for [t1] [t2] [t3] etc... > >I want to return the list of hits by searching db.theme >for [t1] [t2] [t3] corresponding info (up to 7 exact matches) > > >t1=[t1] >t2=[t2] >t3=[t3] [!]variables fire fine...[/!] > >[!]====== Search results ======[/!] >[search >db=[tRoot]db/theme.db&eqthemedata=[t1]&eqthemedata=[t2]&eqthemedata=[t3]&eqthemedata=[t4]&eqthemedata=[t5]&eqthemedata=[t6]&eqthemedata=[t7]&themesumm=T&allreqd=T] > >[founditems] > > > > > > > >
[theme][fresh][airtime][composer][affiliation][publisher]
>[/founditems] >[/search] > >Cheers Chas > >------------------------------------------------------------- >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 > >Web Archive of this list is at: http://search.smithmicro.com/ ------------------------------------------------------------- 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 Web Archive of this list is at: http://search.smithmicro.com/ Brian Fries

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:

Re:Help name our technology! (1997) WebDNA Life Cycle (was Form POSTing with LONG variable) (2007) [WebDNA] OT? - how to get webdna to tell browser to open SWF directly in the browser? (2009) Include vs. lookup? (1998) Credit Card Checksum (1997) A little syntax help (1997) Logging purchases (1997) SKU (1997) New Zealand [OT - was Car Database] (2002) SQL Changes in 3.0.7? (2000) [WebDNA] lighttpd and gzip compression with webdna? (2015) Design Help Needed (1998) Loss in form (1998) Test again - Am I seeing double? (2003) Arrays (2000) Disregard Not reading blanks (1998) WebCat and Flash (2000) [protect admin] (1997) Unexpected error (1997) WebCatalog2 Feature Feedback (1996)