Re: need some help with a loop [nested search?]

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23107
interpreted = N
texte = It's close, but almost doesn't work. The code I settled on is below. BTW, I discovered that if you use max=1 in the first search, it only returns the same number of data entries as heading entries are found (ie- only 5 headings found, only 5 data entires found)Any returns in the formula are a result of the email. They are not in the original formula...[search db=fleet.db&wsissuedatarq=[issue]&wscategorydatarq=[category]&locationsumm=T ] [foundItems] [location] - [category]

[search db=fleet.db&wsissuedatarq=[issue]&wscategorydatarq=[category]&wslocationdata =[location]&airlinesort=1&airlinessdir=as&aircrafttypesort=2] [foundItems] [airline] [aircrafttype] [regn] [MSN] [notes]
[/foundItems] [/search] [/founditems] [/search]What this produces is:USA ----------------- <---- heading All data, all data <---- dataCANADA -------------- <---- heading All data, all data <---- dataetc...instead of:USA ----------------- <---- heading USA data, USA data, USA data <---- dataCANADA -------------- <---- heading CANADA data, CANADA data, CANADA data <---- dataAny more ideas? Bill At 8:40 PM -0800 1/29/99, PCS Technical Support wrote:>>I need to return data based on a location, of which there are 8 (USA, >>CANADA, THE AMERICAS, EUROPE, AFRICA, EAST ASIA, WEST ASIA, OCEANIA). These >>are Summarized from a list of about 150 entries. > >This is called a nested search. You can see an example using 2 databases >in your online docs at >http://www.smithmicro.com/WebDNAReference/SearchMultipleDatabases.html > >In your case, you're searching a single database, but the idea is the same. >There is no looping or counting necessary, because the [founditems] do that >for you: > >[search >db=fleet.db&wsissuedatarq=[issue]&wscategorydatarq=[category]&locationsumm= >T&max >=1] > [foundItems] > [location] - [category]
> [search >db=fleet.db&wsissuedatarq=[issue]&wscategorydatarq=[category]&wslocationdat >a=[lo >cation]&airlinesort=1&airlinessdir=as&aircrafttypesort=2] > [foundItems] > [airline] > [aircrafttype] > [regn] > [MSN] > [notes] > [/founditems] > [/search] > [/founditems] >[/search] > >The interior search gets its values for [issue], [category], etcetera, from >the exterior search's [founditems] loop. > >Technical Support | ==== eCommerce and Beyond ==== >Pacific Coast Software | WebCatalog, WebMerchant, >11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, >San Diego, CA 92128 | Typhoon >619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/-- Bill Heissenbuttel (bill@pagehouse.com) - http://www.pagehouseinc.com PageHouse, Inc. - Internet Presence Provider (509) 892-1973 - PGP key ID: 0xE8544665 (http://pgpkeys.mit.edu:11371) Associated Messages, from the most recent to the oldest:

    
  1. Re: need some help with a loop [nested search?] (Bill Heissenbuttel 1999)
  2. Re: need some help with a loop [nested search?] (Christer Olsson 1999)
  3. Re: need some help with a loop [nested search?] (Bill Heissenbuttel 1999)
It's close, but almost doesn't work. The code I settled on is below. BTW, I discovered that if you use max=1 in the first search, it only returns the same number of data entries as heading entries are found (ie- only 5 headings found, only 5 data entires found)Any returns in the formula are a result of the email. They are not in the original formula...[search db=fleet.db&wsissuedatarq=[issue]&wscategorydatarq=[category]&locationsumm=T ] [founditems] [location] - [category]

[search db=fleet.db&wsissuedatarq=[issue]&wscategorydatarq=[category]&wslocationdata =[location]&airlinesort=1&airlinessdir=as&aircrafttypesort=2] [founditems] [airline] [aircrafttype] [regn] [MSN] [notes]
[/foundItems] [/search] [/founditems] [/search]What this produces is:USA ----------------- <---- heading All data, all data <---- dataCANADA -------------- <---- heading All data, all data <---- dataetc...instead of:USA ----------------- <---- heading USA data, USA data, USA data <---- dataCANADA -------------- <---- heading CANADA data, CANADA data, CANADA data <---- dataAny more ideas? Bill At 8:40 PM -0800 1/29/99, PCS Technical Support wrote:>>I need to return data based on a location, of which there are 8 (USA, >>CANADA, THE AMERICAS, EUROPE, AFRICA, EAST ASIA, WEST ASIA, OCEANIA). These >>are Summarized from a list of about 150 entries. > >This is called a nested search. You can see an example using 2 databases >in your online docs at >http://www.smithmicro.com/WebDNAReference/SearchMultipleDatabases.html > >In your case, you're searching a single database, but the idea is the same. >There is no looping or counting necessary, because the [founditems] do that >for you: > >[search >db=fleet.db&wsissuedatarq=[issue]&wscategorydatarq=[category]&locationsumm= >T&max >=1] > [founditems] > [location] - [category]
> [search >db=fleet.db&wsissuedatarq=[issue]&wscategorydatarq=[category]&wslocationdat >a=[lo >cation]&airlinesort=1&airlinessdir=as&aircrafttypesort=2] > [founditems] > [airline] > [aircrafttype] > [regn] > [MSN] > [notes] > [/founditems] > [/search] > [/founditems] >[/search] > >The interior search gets its values for [issue], [category], etcetera, from >the exterior search's [founditems] loop. > >Technical Support | ==== eCommerce and Beyond ==== >Pacific Coast Software | WebCatalog, WebMerchant, >11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, >San Diego, CA 92128 | Typhoon >619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/-- Bill Heissenbuttel (bill@pagehouse.com) - http://www.pagehouseinc.com PageHouse, Inc. - Internet Presence Provider (509) 892-1973 - PGP key ID: 0xE8544665 (http://pgpkeys.mit.edu:11371) Bill Heissenbuttel

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:

Prevent multiple appends with Reload Button (1997) A multi-processor savvy WebCatalog? (1997) Document Contains No Data! (1997) member access (2000) WebCat and WebTV (1997) Custom WebCat Prefs ... (1997) Using Cookie for client specific info? (1997) Erotic Sites (1997) WebCat2b12 Mac.acgi--[searchstring] bug (1997) Include a big block of text (1997) createfolder not behaving as expected (1999) Strange intermittent WebDNA problems (2008) Sort Order on a page search (1997) process SSI (1998) Speaking of... (1999) Possible Bug in 2.0b15.acgi (1997) Header Values won't take. (1998) bug in [SendMail] (1997) [WebDNA] Broken Links on Webdna.us Website (2011) More questions about serial number dishing (1997)