Can a function call itself?
Posted: Tue Jan 07, 2003 6:20 am
I'm trying to make a message-board (much like this one) and I'm clear on how I'm gonna list messages in the main window, also messages have a parent-id in the database, discerning what message it is an answer to, and each message has an int in the database telling how many childen-messages it has.
My problem is that a childen-message can have children and children of children of children...
So how do I loop through them to get them to list correctly below the right message?
One possible sollution is having a function listing 1 message with input message-id, then calling itself subsequently when it lists a message with a child...is this doable?
Can a function call itself??
Thanx
Rincewind_the_Wizzard
My problem is that a childen-message can have children and children of children of children...
So how do I loop through them to get them to list correctly below the right message?
One possible sollution is having a function listing 1 message with input message-id, then calling itself subsequently when it lists a message with a child...is this doable?
Can a function call itself??
Thanx
Rincewind_the_Wizzard