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:

Add to a field (1998) mass mailing (1998) $Append for Users outside the ADMIN group (1997) [WebDNA] Fwd: Creating Dynamic Content based on your subdomains (2020) Storefornts (1997) $purchase WITHOUT creditcar (1997) PCS Frames (1997) F2 to F3 rocky transition (1997) setitems, one more thing (1997) problems with 2 tags shakur (1997) (1997) NT License trade for Mac (2000) WebCat2 beta 11 - new prefs ... (1997) Ok here is a question? (1997) RE: WebCat cannot handle compatible search parameters? (1997) Dark Horse Comics success story (1997) TCPConnect , can I get an example, pretty please. (2002) Type 11 errors setting up WebCAt 2 (1997) WebCat2b13MacPlugin - [math][date][/math] problem (1997) Not really WebCat (1997)