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:

Progress !! WAS: Trouble with formula.db (1997) Shopping Cart Deletion (2000) TCP Connect (2003) Practice runs ? (1997) Weird problems with [SHOWIF]s (1997) [WebDNA] Secure & HttpOnly Session Cookies (2013) founditems (1998) Image upload (2000) $Replace with [founditems] (1997) ACGI processing for .html (1997) [MOVEFILE] question (2004) Pull down menu for categories (2000) [WebDNA] v7 problem? (2012) syntax question, not in online refernce (1997) Price problem (1997) date formatting for CC card expiration date check (1998) WebDNA Feature Request (2006) Re: (1998) Version f1 status (1997) RedHat Linux glibc version 2.1.2 or higher required (2000)