Re: finding child records of child records of child records... with minimal code

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 32719
interpreted = N
texte = fantastic! (Crosses fingers that stack memory or whatever it is called does not become a problem as this db grows HUGE)-JohnJohn Peacock wrote:> Yes, that is a good job for recursion. You want to write an include > file that should include itself, with the parameter of the current ID. > This will generate the full tree of found records. > > In pseudo-code form (i.e. this is guaranteed to _not_ run): > > [Include file=includefile.inc&myID=[ID]] [!] look for top record [/!] > > and the include file would be: > > [Search db=file.db&parentID=[myID]] > [founditems] > [ReplaceFoundItems]flag=Y[/ReplaceFoundItems] (if you have 4.0) > [Include file=thisfile.inc&myID=[ID]] > [/founditems] > [/search] > > HTH > > John Peacock > > ------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: finding child records of child records of child records... with minimal code (John Butler 2000)
  2. Re: finding child records of child records of child records... with minimal code (John Peacock 2000)
  3. finding child records of child records of child records... with minimal code (John Butler 2000)
fantastic! (Crosses fingers that stack memory or whatever it is called does not become a problem as this db grows HUGE)-JohnJohn Peacock wrote:> Yes, that is a good job for recursion. You want to write an include > file that should include itself, with the parameter of the current ID. > This will generate the full tree of found records. > > In pseudo-code form (i.e. this is guaranteed to _not_ run): > > [Include file=includefile.inc&myID=[ID]] [!] look for top record [/!] > > and the include file would be: > > [Search db=file.db&parentID=[myID]] > [founditems] > [replacefounditems]flag=Y[/ReplaceFoundItems] (if you have 4.0) > [Include file=thisfile.inc&myID=[ID]] > [/founditems] > [/search] > > HTH > > John Peacock > > ------------------------------------------------------------- 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://search.smithmicro.com/ John Butler

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:

[convertchars] Problem (2000) Design Help Needed (1998) Nested vs conditional (1997) Writing multiple data into one field (1998) Sporadic database errors (2005) Multihoming and webcat (1998) Menu to select product variations (1997) Country & Ship-to address & other fields ? (1997) A multi-processor savvy WebCatalog? (1997) Doctype (2004) service stop and restart (1997) [ShowNext] (1997) Shipcost lookup? (1997) WebDNA 4.5.1 Now Available (2003) Ready to h[url]!!! (1999) RE: Can't get appendfile to work (1997) 2nd WebCatalog2 Feature Request (1996) Interpret Around Contexts? (2000) best way to store prefs (1998) Signal Raised Error (1997)