Re: Searching multiple Databases

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10445
interpreted = N
texte = >How do I perform a search on multiple databases in the same search?Depends on how you want the results presented. Putting 2 different [Search] contexts into the same template will cause all the results of 1 search to be displayed, then the results of the second:[Search db=somedb1&criteria=xx] [FoundItems]...[/FoundItems] [/Search][Search db=somedb2&criteria=xx] [FoundItems]...[/FoundItems] [/Search]Or if you want to look up some information from a second database while in the middle of [FoundItems] on the first, it may look like:[Search db=SomeDB1&criteria=xx] [FoundItems] [ZipCode] <-- this comes from somedb1 [Lookup db=SomeDB2&lookInField=ZipCode&value=[ZipCode]&returnField=State] [/FoundItems] [/Search]The Lookup searches through someDB2 for a ZipCode that matches the [ZipCode] field from SomeDB1, and returns the corresponding State.The secret here is to nest searches within other searches, using [fields] from one database as search criteria for the interior searches.Grant Hulbert, V.P. Engineering | Tools for WebWarriors Pacific Coast Software | WebCatalog, WebCommerce Solution 11770 Bernardo Plaza Court, #462 | SiteEdit, SiteCheck, PhotoMaster San Diego, CA 92128 | 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com ------------------------------------ To leave this talk list send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Associated Messages, from the most recent to the oldest:

    
  1. Re: Searching Multiple Databases (Eric palhof 2000)
  2. Re: Searching Multiple Databases (Kenneth Grome 2000)
  3. Re: Searching Multiple Databases (Eric palhof 2000)
  4. Re: Searching Multiple Databases (WebDNA Support 2000)
  5. Re: Searching Multiple Databases (Eric palhof 2000)
  6. Re: Searching Multiple Databases (WebDNA Support 2000)
  7. Searching Multiple Databases (Eric palhof 2000)
  8. Re: Searching multiple databases (Kenneth Grome 1998)
  9. Re: Searching multiple databases (Kenneth Grome 1998)
  10. Searching multiple databases (Marty Schmid 1998)
  11. Re: searching multiple databases (Kenneth Grome 1997)
  12. Re: searching multiple databases (Brian B. Burton 1997)
  13. Re: searching multiple databases (Raymond Hatch 1997)
  14. Re: searching multiple databases (Kenneth Grome 1997)
  15. Re: searching multiple databases (Grant Hulbert 1997)
  16. searching multiple databases (Raymond Hatch 1997)
  17. Re: searching multiple databases in single search (Sandra L. Pitner <76501.3521@CompuServe.COM> 1997)
  18. Re: searching multiple databases in single search (Kenneth Grome 1997)
  19. searching multiple databases in single search (Sandra L. Pitner <76501.3521@CompuServe.COM> 1997)
  20. Re: Searching multiple Databases (John Hill 1997)
  21. Re: Searching multiple Databases (Grant Hulbert 1997)
  22. Searching multiple Databases (Michael Winston 1997)
>How do I perform a search on multiple databases in the same search?Depends on how you want the results presented. Putting 2 different [search] contexts into the same template will cause all the results of 1 search to be displayed, then the results of the second:[Search db=somedb1&criteria=xx] [founditems]...[/FoundItems] [/Search][Search db=somedb2&criteria=xx] [founditems]...[/FoundItems] [/Search]Or if you want to look up some information from a second database while in the middle of [founditems] on the first, it may look like:[Search db=SomeDB1&criteria=xx] [founditems] [ZipCode] <-- this comes from somedb1 [Lookup db=SomeDB2&lookInField=ZipCode&value=[ZipCode]&returnField=State] [/FoundItems] [/Search]The Lookup searches through someDB2 for a ZipCode that matches the [ZipCode] field from SomeDB1, and returns the corresponding State.The secret here is to nest searches within other searches, using [fields] from one database as search criteria for the interior searches.Grant Hulbert, V.P. Engineering | Tools for WebWarriors Pacific Coast Software | WebCatalog, WebCommerce Solution 11770 Bernardo Plaza Court, #462 | SiteEdit, SiteCheck, PhotoMaster San Diego, CA 92128 | 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com ------------------------------------ To leave this Talk List send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Grant Hulbert

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:

Authenticate (1997) WebCat2b13MacPlugin - nested [xxx] contexts (1997) Major problem (1999) WCS Newbie question (1997) [SHOWIF] (1997) shownext & math (1997) RAM variables (1997) WebCatalog 4.0 has been released! (2000) Searching multiple Databases (1997) Carrying over data? (1997) authorize.net hex coded variables (2002) WebDNA tags in WebMerchant email templates ... (1997) template not found error (1998) WCS Newbie question (1997) WebCat2b13MacPlugIn - [shownext method=post] ??? (1997) WebCat2 - Getting to the browser's username/password data (1997) X etc.... (1999) Progress !! WAS: Trouble with formula.db (1997) docs for WebCatalog2 (1997) browser info.txt and SSL (1997)