David Otton wrote:
On Wed, 19 Feb 2003 13:56:49 +0000, 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 of looping and recursion.
make sure /all/ your comments have the correct topicid set. Then simply
"DELETE FROM comment WHERE topicid = x"
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?
Jono
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php