Re: Search Philosophy

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 39366
interpreted = N
texte = >Hello, question from a confused designer.... >In a basic search string similiar to: > >[search db=some.db&eqFIELDdatarq=var] >[founditems] >some action >[/founditems] >[/search] > >If one wants to enact an action on both the found >items that equal FIELD and that founditems that dont equal >FIELD does one need two search contexts? As I see it, there are two approaches to this,1. as you have discovered, 2 searches.2. search for ALL the records (neFIELDdatarq=[blank]) and use showif's and hideif's to make the difference [founditems][showif [field]=var][/showif][hideif [field]=var][/hideif][/founditems]Which approach you want to use depends on your situation, db size, performance issues, and so on. A little side by side comparison may be in order.Without knowing the rest of your code, I prefer to do something like #2: [search db=some.db&neFIELDdatarq=[blank]][founditems] [showif [FIELD]=var][text]t_field=[var][/showif] [hideif [FIELD]=var][text]t_field=something else[/hideif]More code using [t_field] [/founditems] [/search]You may also want to research [lookup] especially in relation to the notfound parameter.HTHs -Sam> >In otherwords, I want to change a variable to something >if it is found and something else if it is not found. > >thanks. > > > > >-- Donovan D. Brooke >Systems Administrator/ >Assc. Art Director >Epsen Hillmer Graphics > > >I know I'm making progress when I look at the questions I have >asked in the past and think to myself... how stupid was that > > >------------------------------------------------------------- >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: Search Philosophy (John Peacock 2001)
  2. Re: Search Philosophy (Donovan Brooke 2001)
  3. Re: Search Philosophy (John Peacock 2001)
  4. Re: Search Philosophy (Donovan Brooke 2001)
  5. Re: Search Philosophy (John Peacock 2001)
  6. Re: Search Philosophy (Samuel Renkert 2001)
  7. Re: Search Philosophy (Will Starck 2001)
  8. Search Philosophy (Donovan Brooke 2001)
>Hello, question from a confused designer.... >In a basic search string similiar to: > >[search db=some.db&eqFIELDdatarq=var] >[founditems] >some action >[/founditems] >[/search] > >If one wants to enact an action on both the found >items that equal FIELD and that founditems that dont equal >FIELD does one need two search contexts? As I see it, there are two approaches to this,1. as you have discovered, 2 searches.2. search for ALL the records (neFIELDdatarq=[blank]) and use showif's and hideif's to make the difference [founditems][showif [field]=var][/showif][hideif [field]=var][/hideif][/founditems]Which approach you want to use depends on your situation, db size, performance issues, and so on. A little side by side comparison may be in order.Without knowing the rest of your code, I prefer to do something like #2: [search db=some.db&neFIELDdatarq=[blank]][founditems] [showif [FIELD]=var][text]t_field=[var][/showif] [hideif [FIELD]=var][text]t_field=something else[/hideif]More code using [t_field] [/founditems] [/search]You may also want to research [lookup] especially in relation to the notfound parameter.HTHs -Sam> >In otherwords, I want to change a variable to something >if it is found and something else if it is not found. > >thanks. > > > > >-- Donovan D. Brooke >Systems Administrator/ >Assc. Art Director >Epsen Hillmer Graphics > > >I know I'm making progress when I look at the questions I have >asked in the past and think to myself... how stupid was that > > >------------------------------------------------------------- >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/ Samuel Renkert

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:

OT: Reverse WHOIS (2003) Looking for a host (1997) WebCommerce: Folder organization ? (1997) Interfacing WebMerchant to www.fedex.com (1997) Cannot get subtotal to work (1997) Country & Ship-to address & other fields ? (1997) apache - nobody??!??1 (2001) [WebDNA] API Integration (2010) nesting limits? (1998) Sendmail doesn't (was Queertrons?) (1997) Web Browser %Numbers - A must read for web developers (2003) Newbie needs advice to learn to use WebDNA (2003) re:check boxes (1997) Text data with spaces in them... (1997) [ENCRYPT seed=xxxxx] length (2000) [WebDNA] exemple of [arrayset] & [arrayget] (2012) WebCatalog Upgrade Pricing? (1997) Fun with dates (1997) Using .htaccess and ModRewrite - (was [OT] CSS and SSI books) (2004) triggers (2003)