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:

Text data with spaces in them... (1997) 'page impression' techniques for banner ads (1999) Adding up line items. (2000) OT: NT mac sharing (1998) WebCat2 - [include] tags (1997) Date problems-more (1997) Error with [applescript] (1999) Security for malls with different webmasters (1998) well sort of - database design (2003) target=_blank and form variables (1997) all records returned. (1997) A little syntax help (1997) Just Testing (1997) [SHOWIF]s and empty arguments (1997) [shell] (2005) Re:Emailer and encryption (1997) purchase.log file (1997) Re1000001: Setting up shop (1997) delete a file? (1998) Nesting FoundItem Context (1997)