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 WebWarriorsPacific Coast Software | WebCatalog, WebCommerce Solution11770 Bernardo Plaza Court, #462 | SiteEdit, SiteCheck, PhotoMasterSan 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.comwith BODYunsubscribe WebDNA-Talk------------------------------------
Associated Messages, from the most recent to the oldest:
>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 WebWarriorsPacific Coast Software | WebCatalog, WebCommerce Solution11770 Bernardo Plaza Court, #462 | SiteEdit, SiteCheck, PhotoMasterSan 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.comwith BODYunsubscribe 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)