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:

WC1.6 to WC2 date formatting (1997) Shipping charge question (2003) date formatting for CC card expiration date check (1998) OT - New Ti Books (2002) [quantity] - spoke too soon (1997) taxTotal, grandTotal (1997) Updated EditPlus Tags (2004) Multiple fields on 1 input (1997) Orderfile context problem (1998) Online reference (1997) Sort Order on a page search (1997) using showpage and showcart commands (1996) Searching multiple Databases (1997) Problem searching bw & ne of a word (1999) [search] within [listfiles]? (2003) WebCat2 Append problem (B14Macacgi) (1997) WC2b15 File Corruption (1997) [CART] inside a [LOOP] (1997) form data submission gets truncated (1997) Upgrading old WebCat Database Files (1997)