Re: searching with if/then

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 58012
interpreted = N
texte = You need a space between the "if" and the "(", so they look like "[If (". Some basic debugging techniques would be most useful here... Replace "[search..." with "[*search..." and run the page so WebDNA won't process the search and you'll see the actual search parameters that are generated by all your ifs. When the code is generating what you want, remove the asterisk and your search should work. - brian On May 25, 2004, at 8:01 AM, Jon Young wrote: > Stuart, > > Thanks a bunch. But still, no luck. I get the same error. Don't these > If/Then statements work the same way as the showifs in setting the > search parameters? When I take the if/then's the search context begins > working. when they are there, the context is not found. I don't get > it. > > Jon > -- > Jon Young | Phil's Fonts > 501 Olney Sandy Spring Road, Sandy Spring, MD 20860 > tel 800-681-9375 or 301-260-2285 | fax 301-260-2277 > mailto:webmaster@philsfonts.com | http://www.philsfonts.com > > On May 24, 2004, at 8:04 PM, Stuart Tremain wrote: > >> Try this: >> >> [search db=../../www.philsfonts.com/vault/philsfonts.db[!] >> [/!][showif >> [URL][keyword][/URL]!]&[wrd]GROUP1datarq=[keyword]&GROUP1FIELD=[!] >> [/!][If(("[fontsrch]"="T")&("[famsrch]"="T"))][Then]nohtml+fontname+fo >> undry+fampkg+[/Then][/If][!] >> [/!][If(("[fontsrch]"="T")&("[famsrch]"="F"))][Then]nohtml+fontname+fo >> undry+fampkg+[/Then][/If][!] >> [/!][If(("[fontsrch]"="F")&("[famsrch]"="T"))][Then]&eqFAMDISPdatarq=T >> [/Then][/If][!] >> [/!][If(("[fontsrch]"="F")&("[famsrch]"="F"))][Then][math >> show=F]err=0,err_num=0[/math][/Then][/If][!] >> [/!][showif >> [URL][foundrystring][/ >> URL]!]&woFOUNDRYdatarq=[foundrystring]&FOUNDRYword=sw&FOUNDRYwbrk=,[/ >> showif][!] >> [/!][showif >> [URL][designer][/URL]!]&eqDESIGNERdatarq=[designer][/showif][!] >> [/!][showif >> [URL][classstring][/ >> URL]!]&woCLASSIFICATIONdatarq=[classstring]&CLASSIFICATIONword=sw&CLAS >> SIFICATIONwbrk=,[/showif][!] >> [/!]&MANOPTsort=1&MANOPTtype=text&MANOPTsdir=de&FONTNAMEsort=2&FONTNAM >> Etype=text&FONTNAMEsdir=as&VOLPKGNUMsort=3&FONTNAMEsumm=T&startat=[sta >> rtat]&max=[rslts]][/showif][/search] >> >> >> Put URL around your showifs and " in your Ifs as you are doing a Text >> comparison you must declare it to be text by using " >> >> >> >> >> >> >> On 25 May 2004, at 09:57 AM, Jon Young wrote: >> >>> [search db=../../www.philsfonts.com/vault/philsfonts.db[!] >>> [/!][showif [keyword]!]&[wrd]GROUP1datarq=[keyword]&GROUP1FIELD=[!] >>> [/!][If(([fontsrch]=T)&([famsrch]=T))][Then]nohtml+fontname+foundry+f >>> ampkg+[/Then][/If][!] >>> [/!][If(([fontsrch]=T)&([famsrch]=F))][Then]nohtml+fontname+foundry+f >>> ampkg+[/Then][/If][!] >>> [/!][If(([fontsrch]=F)&([famsrch]=T))][Then]&eqFAMDISPdatarq=T[/ >>> Then][/If][!] >>> [/!][If(([fontsrch]=F)&([famsrch]=F))][Then][math >>> show=F]err=0,err_num=0[/math][/Then][/If][!] >>> [/!][showif >>> [foundrystring]!]&woFOUNDRYdatarq=[foundrystring]&FOUNDRYword=sw&FOUN >>> DRYwbrk=,[/showif][!] >>> [/!][showif [designer]!]&eqDESIGNERdatarq=[designer][/showif][!] >>> [/!][showif >>> [classstring]!]&woCLASSIFICATIONdatarq=[classstring]&CLASSIFICATIONwo >>> rd=sw&CLASSIFICATIONwbrk=,[/showif][!] >>> [/!]&MANOPTsort=1&MANOPTtype=text&MANOPTsdir=de&FONTNAMEsort=2&FONTNA >>> MEtype=text&FONTNAMEsdir=as&VOLPKGNUMsort=3&FONTNAMEsumm=T&startat=[s >>> tartat]&max=[rslts]][/showif][/search] >> Regards >> >> Stuart Tremain >> idfk web developments >> 114a/40 yeo street neutral bay 2089 australia >> t +612 9908 2134 >> f +612 9908 4837 >> >> >> ------------------------------------------------------------- >> 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://webdna.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://webdna.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://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: searching with if/then ( Gary Krockover 2004)
  2. Re: searching with if/then ( Stuart Tremain 2004)
  3. Re: searching with if/then ( "Sal" 2004)
  4. Re: searching with if/then ( Brian Fries 2004)
  5. Re: searching with if/then ( Jon Young 2004)
  6. Re: searching with if/then ( Stuart Tremain 2004)
  7. searching with if/then ( Jon Young 2004)
You need a space between the "if" and the "(", so they look like "[If (". Some basic debugging techniques would be most useful here... Replace "[search..." with "[*search..." and run the page so WebDNA won't process the search and you'll see the actual search parameters that are generated by all your ifs. When the code is generating what you want, remove the asterisk and your search should work. - brian On May 25, 2004, at 8:01 AM, Jon Young wrote: > Stuart, > > Thanks a bunch. But still, no luck. I get the same error. Don't these > If/Then statements work the same way as the showifs in setting the > search parameters? When I take the if/then's the search context begins > working. when they are there, the context is not found. I don't get > it. > > Jon > -- > Jon Young | Phil's Fonts > 501 Olney Sandy Spring Road, Sandy Spring, MD 20860 > tel 800-681-9375 or 301-260-2285 | fax 301-260-2277 > mailto:webmaster@philsfonts.com | http://www.philsfonts.com > > On May 24, 2004, at 8:04 PM, Stuart Tremain wrote: > >> Try this: >> >> [search db=../../www.philsfonts.com/vault/philsfonts.db[!] >> [/!][showif >> [url][keyword][/URL]!]&[wrd]GROUP1datarq=[keyword]&GROUP1FIELD=[!] >> [/!][If(("[fontsrch]"="T")&("[famsrch]"="T"))][Then]nohtml+fontname+fo >> undry+fampkg+[/Then][/If][!] >> [/!][If(("[fontsrch]"="T")&("[famsrch]"="F"))][Then]nohtml+fontname+fo >> undry+fampkg+[/Then][/If][!] >> [/!][If(("[fontsrch]"="F")&("[famsrch]"="T"))][Then]&eqFAMDISPdatarq=T >> [/Then][/If][!] >> [/!][If(("[fontsrch]"="F")&("[famsrch]"="F"))][Then][math >> show=F]err=0,err_num=0[/math][/Then][/If][!] >> [/!][showif >> [url][foundrystring][/ >> URL]!]&woFOUNDRYdatarq=[foundrystring]&FOUNDRYword=sw&FOUNDRYwbrk=,[/ >> showif][!] >> [/!][showif >> [url][designer][/URL]!]&eqDESIGNERdatarq=[designer][/showif][!] >> [/!][showif >> [url][classstring][/ >> URL]!]&woCLASSIFICATIONdatarq=[classstring]&CLASSIFICATIONword=sw&CLAS >> SIFICATIONwbrk=,[/showif][!] >> [/!]&MANOPTsort=1&MANOPTtype=text&MANOPTsdir=de&FONTNAMEsort=2&FONTNAM >> Etype=text&FONTNAMEsdir=as&VOLPKGNUMsort=3&FONTNAMEsumm=T&startat=[sta >> rtat]&max=[rslts]][/showif][/search] >> >> >> Put URL around your showifs and " in your Ifs as you are doing a Text >> comparison you must declare it to be text by using " >> >> >> >> >> >> >> On 25 May 2004, at 09:57 AM, Jon Young wrote: >> >>> [search db=../../www.philsfonts.com/vault/philsfonts.db[!] >>> [/!][showif [keyword]!]&[wrd]GROUP1datarq=[keyword]&GROUP1FIELD=[!] >>> [/!][If(([fontsrch]=T)&([famsrch]=T))][Then]nohtml+fontname+foundry+f >>> ampkg+[/Then][/If][!] >>> [/!][If(([fontsrch]=T)&([famsrch]=F))][Then]nohtml+fontname+foundry+f >>> ampkg+[/Then][/If][!] >>> [/!][If(([fontsrch]=F)&([famsrch]=T))][Then]&eqFAMDISPdatarq=T[/ >>> Then][/If][!] >>> [/!][If(([fontsrch]=F)&([famsrch]=F))][Then][math >>> show=F]err=0,err_num=0[/math][/Then][/If][!] >>> [/!][showif >>> [foundrystring]!]&woFOUNDRYdatarq=[foundrystring]&FOUNDRYword=sw&FOUN >>> DRYwbrk=,[/showif][!] >>> [/!][showif [designer]!]&eqDESIGNERdatarq=[designer][/showif][!] >>> [/!][showif >>> [classstring]!]&woCLASSIFICATIONdatarq=[classstring]&CLASSIFICATIONwo >>> rd=sw&CLASSIFICATIONwbrk=,[/showif][!] >>> [/!]&MANOPTsort=1&MANOPTtype=text&MANOPTsdir=de&FONTNAMEsort=2&FONTNA >>> MEtype=text&FONTNAMEsdir=as&VOLPKGNUMsort=3&FONTNAMEsumm=T&startat=[s >>> tartat]&max=[rslts]][/showif][/search] >> Regards >> >> Stuart Tremain >> idfk web developments >> 114a/40 yeo street neutral bay 2089 australia >> t +612 9908 2134 >> f +612 9908 4837 >> >> >> ------------------------------------------------------------- >> 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://webdna.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://webdna.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://webdna.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:

SKU (1997) Frames and WebCat (1997) [OT] Bookmarking code (2003) Pass a form (2003) WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997) Falsifying [BROWSERNAME] (1998) Grant, please help me ... (1997) 'does not contain' operator needed ... (1997) Creditcard verification with WebCat (1998) NY taxRates.db? (1997) PSC recommends what date format yr 2000??? (1997) ErrorMessages.db suggestion (1997) REDIRECT (2001) tax rate off by 1 cent (1997) WebCatalog 2.1b3 - Plugin or cgi ? (1997) Sorting by date (1997) Questions To Answer (1997) Mac webcatalog3_0_5b11 more dead lock throws (1999) emailer error 452 (2001) Multiple Pulldowns (1997)