Re: Search Philosophy

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 39367
interpreted = N
texte = Donovan Brooke wrote: > > Hello, question from a confused designer.... > In a basic search string similiar to: > > [search db=some.db&eqFIELDdatarq=var] > [founditems] > some action > [/founditems] > [/search]That search will ONLY return the records where FIELD==var.> > 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?Yes> > In otherwords, I want to change a variable to something > if it is found and something else if it is not found.If your search is binary (i.e. either the FIELD==var or not), do a search for everything and act accordingly on a record by record basis.If you are only searching for the existance of at least 1 record where FIELD==var, then you should use [lookup...] as it is vastly faster. If the lookup does not find a record matching the criteria, you can use the ¬Found= parameter to signal that case. NOTE: [lookup] is a case sensitive search (i.e. FISH != fish).John-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- 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)
Donovan Brooke wrote: > > Hello, question from a confused designer.... > In a basic search string similiar to: > > [search db=some.db&eqFIELDdatarq=var] > [founditems] > some action > [/founditems] > [/search]That search will ONLY return the records where FIELD==var.> > 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?Yes> > In otherwords, I want to change a variable to something > if it is found and something else if it is not found.If your search is binary (i.e. either the FIELD==var or not), do a search for everything and act accordingly on a record by record basis.If you are only searching for the existance of at least 1 record where FIELD==var, then you should use [lookup...] as it is vastly faster. If the lookup does not find a record matching the criteria, you can use the ¬Found= parameter to signal that case. NOTE: [lookup] is a case sensitive search (i.e. FISH != fish).John-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- 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/ John Peacock

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:

Frames and WebCat (1997) SearchTitle Question (1998) date math [2.x] (1999) user flush db (2002) WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) [date] for today's date, while inside old order file (1998) Grep question [parsing variables] problem (2003) still having shipCost.db Problem (1997) Tax Collection for Different Items (2003) 2nd WebCatalog2 Feature Request (1996) RedHat dropping 7.x 8.x and 9.x - What linux for WebDNA? (2003) Multiple Merchant Accounts? (1997) searchable list archive (1997) Protect vs Authenicate (1997) Sort of a Dilema! (1998) Part Html part WebDNA (1997) search form problem.. (1997) Max Record length (1997) [SendMail] from a form? (1998) The Form authentication trick (2000)