Linked lists and Recursive searching

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 51191
interpreted = N
texte = Hello everyone,=20I'm hoping that someone can impart some wisdom to me about linked lists and recursive searching. I've been struggling to wrap my head around it for about a week now.=20My goal is to create a simple threaded discussion board (nothing as advanced as the Pubb or other professional solution). Right now I'm just at the level of trying to understand how the data should be set up in the database, and how to do a search that will show the threads in their proper place all at once. =20I've been able to create what kind of looks right, but I'm not sure where I've gone wrong. The html page I search on shows the first two levels the way it's supposed to, like this:forum level =20 main1 main2Forum level2 Below the main1 and main2 levels all the records just cascade down, one right after another as if they were all replies to the message before it. Like this:Forum level main1 reply to main1 reply to reply of main1 A second reply to main1 (this should be in the found items of the first reply to main 1 but it's not) Would someone with the proper knowledge look over what I've done and let me know what I need to do?I'm using webcat 3 on webstar 4.X =20 Here's the database I'm using with mocked up entries. The field names might be technically wrong, so I apologize in advance if they mislead anyone. That's one of the things that I=92m confused about. Forumidthreadidreplyidmsgidchildidsubjectmsgdate 123mainlevel06/01/2003 13256first level06/05/2003 15782second level06/07/2003 139102first level 206/08/2003 1812132third level06/09/2003 11415mainlevel206/08/2003 11016179reply to first level 2 06/09/2003 13181920first level306/10/2003 11321222fourth level06/11/2003 12223242fifth level06/12/2003 1825262third level206/10/2003 11327282fourth Level 206/15/2003 Here's my code on the page that I want to search all the records and show the threads in their proper place. I have three searches, but do I need more? Less? Am I just not searching for the right stuff? Am I searching for the right stuff but my data is off? As you can see I need some serious help, so any I could get would be great.=20[search db=3Dtheboard.tab&eqreplyiddatarq=3D[BLANK]&msgdatesdir=3Das&msgdatetype=3D= date] [founditems]

[subject] - [name] ([msgdate])
[search db=3Dtheboard.tab&eqthreadiddatarq=3D[msgid]&msgdatesdir=3Das&msgdatetype= =3Ddate &msgdatesort=3D1] [founditems] [index] [subject] - [name] ([msgdate])
[search db=3Dtheboard.tab&eqchildiddatarq=3D[replyid]&msgdatesdir=3Das&msgdatetyp= e=3Ddat e&msgdatesort=3D1] [founditems] [text show=3Df]imagewidth=3D[math]([index]*20)[/math][/text][index] [subject] - [name] ([msgdate])
[/founditems] [/search]=09 [/founditems] [/search]

[/founditems] Allen Frye http://www.allenfrye.com=20 ------------------------------------------------------------- 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: Linked lists and Recursive searching (marc@kaiwi.com (Marc Kaiwi) 2003)
  2. Re: Linked lists and Recursive searching (WebCat @ Inkblot Media 2003)
  3. Re: Linked lists and Recursive searching (marc@kaiwi.com (Marc Kaiwi) 2003)
  4. Re: Linked lists and Recursive searching (Alain Russell 2003)
  5. Re: Linked lists and Recursive searching (WebCat @ Inkblot Media 2003)
  6. Re: Linked lists and Recursive searching (marc@kaiwi.com (Marc Kaiwi) 2003)
  7. Re: Linked lists and Recursive searching (WebCat @ Inkblot Media 2003)
  8. Linked lists and Recursive searching (Allen Frye 2003)
Hello everyone,=20I'm hoping that someone can impart some wisdom to me about linked lists and recursive searching. I've been struggling to wrap my head around it for about a week now.=20My goal is to create a simple threaded discussion board (nothing as advanced as the Pubb or other professional solution). Right now I'm just at the level of trying to understand how the data should be set up in the database, and how to do a search that will show the threads in their proper place all at once. =20I've been able to create what kind of looks right, but I'm not sure where I've gone wrong. The html page I search on shows the first two levels the way it's supposed to, like this:forum level =20 main1 main2Forum level2 Below the main1 and main2 levels all the records just cascade down, one right after another as if they were all replies to the message before it. Like this:Forum level main1 reply to main1 reply to reply of main1 A second reply to main1 (this should be in the found items of the first reply to main 1 but it's not) Would someone with the proper knowledge look over what I've done and let me know what I need to do?I'm using webcat 3 on webstar 4.X =20 Here's the database I'm using with mocked up entries. The field names might be technically wrong, so I apologize in advance if they mislead anyone. That's one of the things that I=92m confused about. Forumidthreadidreplyidmsgidchildidsubjectmsgdate 123mainlevel06/01/2003 13256first level06/05/2003 15782second level06/07/2003 139102first level 206/08/2003 1812132third level06/09/2003 11415mainlevel206/08/2003 11016179reply to first level 2 06/09/2003 13181920first level306/10/2003 11321222fourth level06/11/2003 12223242fifth level06/12/2003 1825262third level206/10/2003 11327282fourth Level 206/15/2003 Here's my code on the page that I want to search all the records and show the threads in their proper place. I have three searches, but do I need more? Less? Am I just not searching for the right stuff? Am I searching for the right stuff but my data is off? As you can see I need some serious help, so any I could get would be great.=20[search db=3Dtheboard.tab&eqreplyiddatarq=3D[BLANK]&msgdatesdir=3Das&msgdatetype=3D= date] [founditems]

[subject] - [name] ([msgdate])
[search db=3Dtheboard.tab&eqthreadiddatarq=3D[msgid]&msgdatesdir=3Das&msgdatetype= =3Ddate &msgdatesort=3D1] [founditems] [index] [subject] - [name] ([msgdate])
[search db=3Dtheboard.tab&eqchildiddatarq=3D[replyid]&msgdatesdir=3Das&msgdatetyp= e=3Ddat e&msgdatesort=3D1] [founditems] [text show=3Df]imagewidth=3D[math]([index]*20)[/math][/text][index] [subject] - [name] ([msgdate])
[/founditems] [/search]=09 [/founditems] [/search]

[/founditems] Allen Frye http://www.allenfrye.com=20 ------------------------------------------------------------- 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/ Allen Frye

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:

Behind the Scenes. . . (1998) Issues with the default db files ... (2003) Calculating multiple shipping... (1997) Snake Bites (1997) Why WebMerchant not working? (1999) WebTen? (1997) RE: [WebDNA] Is there a good file upload script available these days? (2009) RE: error count with $purchase (1997) WebCat2 - Getting to the browser's username/password data (1997) %@#*& back button!!! (1999) Internet Explorer 6 Form problems (2005) Possible solution to malformed pages in NN (2000) [WebDNA] Connect to MS SQL (2013) Please.. copies of Digest for 7/29 and 7/30? (1997) using showpage and showcart commands (1996) RE: [WebDNA] [OT] Apple iPad (2010) Forms Search Questions (1997) Quit revisited (1997) WebCat2 Append problem (B14Macacgi) (1997) Tab Charactor (1997)