(blogware)-> (Parent)->simple nesting
submited by Russell Tue 08 Feb 05|
Edited Wed 11 Jan 06
OK I got simple nesting, viewtopic now shows each reply as a link. I have no way to view a reply to a reply|
What is needed is a "view thred" function.
or actually an ibedded thread is what I need.. For one thing I have noticed that I tend to edit a comment simply to append to it ( as I am doing now) when what is really needed is a way to display replys inline via blockquote:
Logisticly this should be simple, it will just require nested reads to the database. Perhaps I could put a limit on the most nested reads that it would do and simply put in Rest of replys.... links when the limit is hit.. but that's actually getting cought up in theoy that probably wouldn't be an issue in the real world. :
Initial comment ( one read to DB)
the real problem I need to get past here is that up until now I have done this with staticly named varibles.
first reply ( 2nd read )
### add your reply space
2nd reply (second record read from 2nd read)
first double nested reply (3rd db read)
3rd reply ( 3rd record from second read )
First read from DB: $result = mysql_query ($query)
To do the nested comments as listed above, I would need to use a 3rd varible. I need to do this with an array so it will work for an abitrary number of reads
2nd read from DB: $tempresult = mysql_query ($tempquery)
$result[$n] = mysql_query ($query[$n])
Such a system would work for far more comments than would fit on screen.
I have to ponder this for a while. It's going to have to be done with a recursive re-entrent php code. While I think I know how to do this in pricipal. I don't write natualy reentrint php code.
simple netsting continued (Russell)
Add comment or question...: