Re: Linked lists and Recursive searching
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 51195
interpreted = N
texte = I will set it up and post a link.:)----- Original Message ----- From: Marc Kaiwi
To: WebDNA Talk Sent: Thursday, June 19, 2003 9:32 PMSubject: Re: Linked lists and Recursive searching> I like it. Do you have a demo of your forum on display anywhere to have> a peek at?>> MK>> On Thursday, June 19, 2003, at 09:31 PM, WebCat @ Inkblot Media wrote:>> > I have a forum that I built a while back that does this. I can dig it> > up if> > you need me to, but I recommend doing this like the categories in> > storebuilder.> >> > ID / TITLE / TYPE / R_ID / P_DATE / P_TIME> > 1 / one / M / * / 6-19-2003 / 12:00:00> > 2 / two / * / 1 / 6-19-2003 / 12:01:00> > 3 / three / * / 1 / 6-19-2003 / 12:02:00> > 4 / four / * / 2 / 6-19-2003 / 12:05:00> > 5 / five /M / * / 6-19-2003 / 12;06:00> >> > How this works is that the M under TYPE marks it as a MAIN POST or> > TOP> > LEVEL.> >> > When someone replys to a specific post you would take the ID of post> > they> > are replying to and put it under R_ID.> >> > thus the above would look> >> > One> > - two> > - three> > -- four> > Five> >> > You would use the P_TIME and P_DATE times to sort the search.> >> > [search> > db=post.db&eqTYPEdatarq=M&asP_DATEdatarq=1&asP_TIMEsort=2&P_DATEtype=da> > te&P_> > TIMEtype=time]> > [founditems]> > > > - [TITLE]
> > [include search_loop.inc]> > [/founditems]> > [/search]> >> >> > -- search loop --> >> > [search> > db=post.db&eqR_IDdatarq=[ID]&asP_DATEdatarq=1&asP_TIMEsort=2&P_DATEtype> > =date> > &P_TIMEtype=time]> > [founditems]> > > > - [include search_loop.inc]
> >
> > [/founditems]> > [/search]> >> > Hope this helps.> >> > Ron> >> >> > ----- Original Message -----> > From: Allen Frye > > To: WebDNA Talk > > Sent: Thursday, June 19, 2003 10:16 PM> > Subject: Linked lists and Recursive searching> >> >> > Hello everyone,> >> > I'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.> >> > My 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.> >> > I'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> >> > main1> >> > main2> >> > Forum 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> >> >> > 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'm confused about.> >> >> > Forumid threadid replyid msgid childid subject msgdate> > 1 2 3 mainlevel 06/01/2003> > 1 3 2 5 6 first level 06/05/2003> > 1 5 7 8 2 second level 06/07/2003> > 1 3 9 10 2 first level 2 06/08/2003> > 1 8 12 13 2 third level 06/09/2003> > 1 14 15 mainlevel2 06/08/2003> > 1 10 16 17 9 reply to first level 2> > 06/09/2003> > 1 3 18 19 20 first level3 06/10/2003> > 1 13 21 22 2 fourth level 06/11/2003> > 1 22 23 24 2 fifth level 06/12/2003> > 1 8 25 26 2 third level2 06/10/2003> > 1 13 27 28 2 fourth Level 2 06/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.> >> > [search> > db=theboard.tab&eqreplyiddatarq=[BLANK]&msgdatesdir=as&msgdatetype=date> > ]> > [founditems]> > [subject] - [name] ([msgdate])
> > [search> > db=theboard.tab&eqthreadiddatarq=[msgid]&msgdatesdir=as&msgdatetype=dat> > e> > &msgdatesort=1]> > [founditems]> >
[index]> > [subject] - [name] ([msgdate])
> > [search> > db=theboard.tab&eqchildiddatarq=[replyid]&msgdatesdir=as&msgdatetype=da> > t> > e&msgdatesort=1]> > [founditems]> > [text> > show=f]imagewidth=[math]([index]*20)[/math][/text]
> width=20 height=1>
> height=1>[index] [subject] - [name] ([msgdate])
> > [/founditems]> > [/search]> > [/founditems]> > [/search]> >
> > [/founditems]> >> >> > Allen Frye> > http://www.allenfrye.com> >> >> > -------------------------------------------------------------> > 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/> >> >> > -------------------------------------------------------------> > 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/> >> >> Signed: Marc Kaiwi>>> -------------------------------------------------------------> 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/-------------------------------------------------------------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:
I will set it up and post a link.:)----- Original Message ----- From: Marc Kaiwi To: WebDNA Talk Sent: Thursday, June 19, 2003 9:32 PMSubject: Re: Linked lists and Recursive searching> I like it. Do you have a demo of your forum on display anywhere to have> a peek at?>> MK>> On Thursday, June 19, 2003, at 09:31 PM, WebCat @ Inkblot Media wrote:>> > I have a forum that I built a while back that does this. I can dig it> > up if> > you need me to, but I recommend doing this like the categories in> > storebuilder.> >> > ID / TITLE / TYPE / R_ID / P_DATE / P_TIME> > 1 / one / M / * / 6-19-2003 / 12:00:00> > 2 / two / * / 1 / 6-19-2003 / 12:01:00> > 3 / three / * / 1 / 6-19-2003 / 12:02:00> > 4 / four / * / 2 / 6-19-2003 / 12:05:00> > 5 / five /M / * / 6-19-2003 / 12;06:00> >> > How this works is that the M under TYPE marks it as a MAIN POST or> > TOP> > LEVEL.> >> > When someone replys to a specific post you would take the ID of post> > they> > are replying to and put it under R_ID.> >> > thus the above would look> >> > One> > - two> > - three> > -- four> > Five> >> > You would use the P_TIME and P_DATE times to sort the search.> >> > [search> > db=post.db&eqTYPEdatarq=M&asP_DATEdatarq=1&asP_TIMEsort=2&P_DATEtype=da> > te&P_> > TIMEtype=time]> > [founditems]> > > > - [TITLE]
> > [include search_loop.inc]> > [/founditems]> > [/search]> >> >> > -- search loop --> >> > [search> > db=post.db&eqR_IDdatarq=[ID]&asP_DATEdatarq=1&asP_TIMEsort=2&P_DATEtype> > =date> > &P_TIMEtype=time]> > [founditems]> > > > - [include search_loop.inc]
> >
> > [/founditems]> > [/search]> >> > Hope this helps.> >> > Ron> >> >> > ----- Original Message -----> > From: Allen Frye > > To: WebDNA Talk > > Sent: Thursday, June 19, 2003 10:16 PM> > Subject: Linked lists and Recursive searching> >> >> > Hello everyone,> >> > I'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.> >> > My 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.> >> > I'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> >> > main1> >> > main2> >> > Forum 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> >> >> > 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'm confused about.> >> >> > Forumid threadid replyid msgid childid subject msgdate> > 1 2 3 mainlevel 06/01/2003> > 1 3 2 5 6 first level 06/05/2003> > 1 5 7 8 2 second level 06/07/2003> > 1 3 9 10 2 first level 2 06/08/2003> > 1 8 12 13 2 third level 06/09/2003> > 1 14 15 mainlevel2 06/08/2003> > 1 10 16 17 9 reply to first level 2> > 06/09/2003> > 1 3 18 19 20 first level3 06/10/2003> > 1 13 21 22 2 fourth level 06/11/2003> > 1 22 23 24 2 fifth level 06/12/2003> > 1 8 25 26 2 third level2 06/10/2003> > 1 13 27 28 2 fourth Level 2 06/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.> >> > [search> > db=theboard.tab&eqreplyiddatarq=[BLANK]&msgdatesdir=as&msgdatetype=date> > ]> > [founditems]> > [subject] - [name] ([msgdate])
> > [search> > db=theboard.tab&eqthreadiddatarq=[msgid]&msgdatesdir=as&msgdatetype=dat> > e> > &msgdatesort=1]> > [founditems]> >
[index]> > [subject] - [name] ([msgdate])
> > [search> > db=theboard.tab&eqchildiddatarq=[replyid]&msgdatesdir=as&msgdatetype=da> > t> > e&msgdatesort=1]> > [founditems]> > [text> > show=f]imagewidth=[math]([index]*20)[/math][/text]
> width=20 height=1>
> height=1>[index] [subject] - [name] ([msgdate])
> > [/founditems]> > [/search]> > [/founditems]> > [/search]> >
> > [/founditems]> >> >> > Allen Frye> > http://www.allenfrye.com> >> >> > -------------------------------------------------------------> > 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/> >> >> > -------------------------------------------------------------> > 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/> >> >> Signed: Marc Kaiwi>>> -------------------------------------------------------------> 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/-------------------------------------------------------------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/
WebCat @ Inkblot Media
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:
WebCatalog can't find database (1997)
MacAuthorize order data fields WAS:How To question... (1997)
Signal Raised error (1997)
New Server? (2006)
Follow-Up to: Removing [showif] makes a big difference in speed (1997)
[HIDEIF] inside [FOUNDITEM] (1997)
Public Beta for WebCatalog 4.0 is Available (2000)
bad idea to not use any html files, only .tpl files? (1999)
listing certain items in the orderfile (2002)
[showif [math (1999)
japanese characters (1997)
[WebDNA] Database Column Update (2015)
Possible Shownext from Listfiles???? (2000)
WC2b12: Yes, Formulas.db is for real (1997)
Date search - yes or no (1997)
Multiple prices (1997)
Wanted: More Math Functions (or, Can You Solve This?) (1997)
Understanding variables (1999)
Comments in db? (1997)
mod_webcatalog2.so.2-40 is garbled (2008)