There is a table named channel in my database(sqlServer2000). It�s data structure as follow: The letter c refers to channel.
Description: Channel_is_father:If this column has children, it is inserted 1, otherwise 0. Column1 is the top column, so it�s channel_father_id is set 0. However the column 3 is the second layer column. Its father is 102 named column2, and so on. Ok. I want to get the data by the layer structure from database and to display on the web. For example:
I wrote java codes to realize this function ,but failed. I don�t know why. My codes:
Output as fellow: Not Father101 *** Not Father113 *** Father102 Father103 Father106 Not Father109 *** ***
The method channelIsFather is used to verify the column whether or not is father column.if so it return 1 ,but 0; The method getChannelId is used to retrieve the channelID.If the channel_id is the father column, which will recall the the method itself again till the condition turned false. Thank u very very much!
Look at me and hear me<br />Because I am here<br />Just for that
I just answered your question here. Please don't post in more than one group -- people will waste their time giving answers that have already been given elsewhere. Time they could've spent helping out someone else. - Peter
Joined: Feb 19, 2002
Originally posted by Peter den Haan: I just answered your question here. Please don't post in more than one group -- people will waste their time giving answers that have already been given elsewhere. Time they could've spent helping out someone else. - Peter
Dear Peter: Thank u for ur reply and suggestion. The reason why I post the same question in more than one group is I don't know my qustion which gorup can be posted,so I post two copies.
Peter den Haan
Joined: Apr 20, 2000
That's OK. Happy to help. Just post in the best forum you can find; you can always say something like "I think this is the best place but please move this if it isn't" and the local bartender will move the thread if (s)he thinks you have a better chance of getting answers elsewhere. - Peter
subject: Who can help me resolve this big problem?