Re: related data

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 47165
interpreted = N
texte = Can you show more fields that are in the products.db? And on your search of this database, it looks like [city] would contain something like +1+6, correct?GK> I think I did a poor job of explaining this last night. > > 2 databases in use > > product.db > > a typical entry in products.db would have in a [sections] field +1+6+2+8+ > > > > sections.db > > These numerical entries are for pulling information from the sections.db > which looks like this: > S_ID S_TYPE S_NAME S_RANK S_RELATED > 1 M Chicago 1 > 2 M Milwaukee 1 > 3 M Detroit 1 > 4 Joliet 1 1 > 5 Schaumburg 2 1 > 6 Arlington 3 1 > 7 Racine 1 2 > 8 Kenosha 2 2 > > > I need to only show +1+6 when the Chicago page is accessed > and only show +2+8 when the Milwaukee page is accessed. > Items in the products.db will have multiple main city and suburban > locations and I only want to show corresponding cities with a main city and > not all the cities for a product > > My search when accessing a page is > [Search > db=^frugal/products.db&eqVisibleDatarq=T&woSECTIONSdatarq=[city]&SECTIONSwor d=ww&namewbrk=+] > > > I've tried the following in the [sections] field on the final page and its > close but not quite there. I can't seem to stop Milwaukee from showing in > Chicago and vice versa . . . > > [ListWords Words=[sections]&delimiters=+] > [Text]city=[/Text] > [Text]curr=[word][/Text] > [loop start=1&end=10&advance=1] > [Text]t=[lookup > db=^frugal/sections.db&value=[curr]&lookInField=S_ID&returnField=S_NAME¬F ound=][/Text] > [Text]maincat=[lookup > db=^frugal/sections.db&value=[curr]&lookInField=S_ID&returnField=S_TYPE¬F ound=][/Text] > [Text]curr=[lookup > db=^frugal/sections.db&value=[curr]&lookInField=S_ID&returnField=S_RELATED&n otFound=][/Text] > [Showif [t]!] > [Text]city=[Showif [maincat]=M][/showif][t][Showif > [maincat]=M][/showif] [Showif [city]!][city][/Showif][/Text] > [/Showif] > [/loop] > [city]
> [/Listwords] > > > How would I separate these entries from the [section] field and show them > in my [founditems]?? > > I seem to be close but I'm missing something it seems. > > thanks again ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: related data (Lester Emo 2003)
  2. Re: related data (Gary Krockover 2003)
  3. related data (Lester Emo 2003)
  4. Re: Related database (John Butler 2000)
  5. Related database (…©rßa 2000)
Can you show more fields that are in the products.db? And on your search of this database, it looks like [city] would contain something like +1+6, correct?GK> I think I did a poor job of explaining this last night. > > 2 databases in use > > product.db > > a typical entry in products.db would have in a [sections] field +1+6+2+8+ > > > > sections.db > > These numerical entries are for pulling information from the sections.db > which looks like this: > S_ID S_TYPE S_NAME S_RANK S_RELATED > 1 M Chicago 1 > 2 M Milwaukee 1 > 3 M Detroit 1 > 4 Joliet 1 1 > 5 Schaumburg 2 1 > 6 Arlington 3 1 > 7 Racine 1 2 > 8 Kenosha 2 2 > > > I need to only show +1+6 when the Chicago page is accessed > and only show +2+8 when the Milwaukee page is accessed. > Items in the products.db will have multiple main city and suburban > locations and I only want to show corresponding cities with a main city and > not all the cities for a product > > My search when accessing a page is > [Search > db=^frugal/products.db&eqVisibleDatarq=T&woSECTIONSdatarq=[city]&SECTIONSwor d=ww&namewbrk=+] > > > I've tried the following in the [sections] field on the final page and its > close but not quite there. I can't seem to stop Milwaukee from showing in > Chicago and vice versa . . . > > [ListWords Words=[sections]&delimiters=+] > [text]city=[/Text] > [text]curr=[word][/Text] > [loop start=1&end=10&advance=1] > [text]t=[lookup > db=^frugal/sections.db&value=[curr]&lookInField=S_ID&returnField=S_NAME¬F ound=][/Text] > [text]maincat=[lookup > db=^frugal/sections.db&value=[curr]&lookInField=S_ID&returnField=S_TYPE¬F ound=][/Text] > [text]curr=[lookup > db=^frugal/sections.db&value=[curr]&lookInField=S_ID&returnField=S_RELATED&n otFound=][/Text] > [Showif [t]!] > [text]city=[Showif [maincat]=M][/showif][t][Showif > [maincat]=M][/showif] [Showif [city]!][city][/Showif][/Text] > [/Showif] > [/loop] > [city]
> [/Listwords] > > > How would I separate these entries from the [section] field and show them > in my [founditems]?? > > I seem to be close but I'm missing something it seems. > > thanks again ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Gary Krockover

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:

WebDelivery: One step closer !! (1997) text size limitation (1997) Adding Shipping Costs based on percent of subtotal (1997) [UPPERCASE] (1997) multi-paragraph fields (1997) Associative lookup style? (1997) Item options w/ price adjustment (1997) Linux Install Question (2000) Nested search (1997) Will webdna execute before a [redirect]? (1999) Running 2 two WebCatalog.acgi's (1996) emailer settings and control questions (1997) Problems appending to database (1997) Stumpted Again (1997) Error Msg (1998) multi-paragraph fields (1997) strange IE 4.0 (1998) WCS Newbie question (1997) PIXO support (1997) Prevent multiple appends with Reload Button (1997)