| вот таблица:
# Структура таблицы `case_sections`
#
CREATE TABLE `case_sections` (
`id_sections` smallint(5) unsigned NOT NULL auto_increment,
`name_sections` tinytext NOT NULL,
`description_sections` text NOT NULL,
`sub_sections` tinytext NOT NULL,
`count_sections` smallint(6) NOT NULL default '0',
`created_sections` tinytext NOT NULL,
`view_sections` enum('y','n') NOT NULL default 'y',
`author_sections` tinytext NOT NULL,
`personnel_sections` tinytext NOT NULL,
PRIMARY KEY (`id_sections`)
) ENGINE=MyISAM DEFAULT CHARSET=koi8r AUTO_INCREMENT=5 ;
#
# Дамп данных таблицы `case_sections`
#
INSERT INTO `case_sections` VALUES (1, 'catalog', 'catalog', '', 0, '2007-09-07 18:48:35', 'y', 'author', 'author 1, author 2.');
INSERT INTO `case_sections` VALUES (2, 'catalog 2', 'catalog 2', '', 0, '2007-09-07 18:50:26', 'y', 'author 2', 'author 1, author 2');
INSERT INTO `case_sections` VALUES (3, 'catalog 3', 'catalog 3', '', 0, '2007-09-07 18:51:19', 'y', 'author 3', 'author 3, author 3');
INSERT INTO `case_sections` VALUES (4, 'sub_catalog 2', 'sub_catalog 2', 'catalog 2', 0, '2007-09-07 18:52:44', 'y', 'sub_author 2', 'sub_author 2, sub_author 2');
|
хочеться добиться вот таково вывода (ну чтоб просмотривалась вложенность)
+catalog
+catalog 2
- sub_catalog 2
+catalog 3
|
а получается такая ерунда,
+catalog
+catalog 2
+catalog 3
- sub_catalog 2
|
никак не могу реализовать....помогите ....
заранее извините если не в тот форум написал...ибо думаю что ближе к php чем к mysql | |