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:

WebDNA 5.0 Questions (2003) Sorting error (1997) before after on (1998) Show if time tags (1997) WC2b15 File Corruption (1997) is your webDNA site 'froogle' ready ??? (2003) Problem 2: Prefs file... (1997) WebCat on OS X 10.4.7 won't send emails (2006) RE: Cookies? (1997) WebDNA implementation of MD5 algorithm? (2003) Mozilla/4. and Browser Info.txt (1997) trouble updating records in database (1998) Separate SSL Server (1997) Problems getting parameters passed into email. (1997) Re:listfiles-looking for slick solution (1997) Interactive Online Docs Was: [OT] Mozilla | Was: R.I.P. (2003) Question about links (1999) Need a link for 4.5; was: WebDNA 4.5.1 Now Available (2003) Mult. Field in mailme.tpl (2000) WebCat for mass emailings (1997)