Hi all,
Thanks for your help. I now have a wealth of things to try - I was
initially going for the bottom up approach by starting at the bottom of
the tree and working up, but I quite like the idea of storing id's in an
array or list, although this would mean two queries to the DB.
I am still
At 14:56 19.02.2003, Jono Bacon spoke out and said:
[snip]
>The code that you posed is the technique I have used at the moment. This
>technique works fine, but like my mate said, this limits me to a single
>parent for a comment/message. I admit that is unli
At 15:16 19.02.2003, Jono Bacon spoke out and said:
[snip]
>How would I go about recursing down the tree? Has anyone done this before?
[snip]
Given the DB layout I sketched before, you would:
1) delete all comments
d
On Wed, 19 Feb 2003 14:16:47 +, you wrote:
>>Otherwise, yes, in MySQL you have to recurse down the tree deleting
>>comments.
>How would I go about recursing down the tree? Has anyone done this before?
I have, but it's been a while. Something like (pseudo-code) .
def delete_comments(a) :
Jono Bacon
ahoo.co.uk> cc:
David Otton wrote:
On Wed, 19 Feb 2003 13:56:49 +, you wrote:
One questions though - if I delete a topic, I need to delete all of its
child messages and all of the child comments from each message. What is
the best technique to do this? This has been driving me up the wall as
it seems
On Wed, 19 Feb 2003 13:56:49 +, you wrote:
>One questions though - if I delete a topic, I need to delete all of its
>child messages and all of the child comments from each message. What is
>the best technique to do this? This has been driving me up the wall as
>it seems to involve some kind
Ernest E Vogelsinger wrote:
At 14:43 19.02.2003, Jono Bacon said:
[snip]
At the moment I have three tables: Topic, Message, Comment. A topic has
messages and each message can have comments. I have set this up with a
table each and a field for the id of
At 14:43 19.02.2003, Jono Bacon said:
[snip]
>At the moment I have three tables: Topic, Message, Comment. A topic has
>messages and each message can have comments. I have set this up with a
>table each and a field for the id of the parent (e.g. a comment wi
9 matches
Mail list logo