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!
[ April 03, 2003: Message edited by: frank yang ]
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!
[ April 03, 2003: Message edited by: frank yang ]