PHP'de sonsuz derinlikte menü yapmak için düzgün bir tablo yapısı ve çok basit bir recursive fonksiyon yeterli. Tablo Yapısı CREATE TABLE `category` ( `sid` int(12) unsigned NOT NULL auto_increment, `module` set('estate','cars') collate utf8_bin NOT NULL, `parentId` int(6) NOT NULL, `title` varchar(255) collate utf8_bin NOT NULL, `isDefault` int(1) NOT NULL default '1', PRIMARY KEY (`sid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=14 ; INSERT INTO `category` VALUES (1, 0x657374617465, 0, 0x536174c4b16cc4b16b20456d6c616b, 1); INSERT INTO `category` VALUES (2, 0x657374617465, 1, 0x45766c6572, 1); INSERT INTO `category` VALUES (3, 0x657374617465, 1, 0xc4b0c59f7965726c657269, 1); INSERT INTO `category` VALUES (4, 0x657374617465, 1, 0x417273616c6172, 1); INSERT INTO `category` VALUES (5, 0x657374617465, 0, 0x4b6972616cc4b16b20456d6c616b, 1); INSERT INTO `category` VALUES (6, 0x657374617465, 5, 0x45766c6572, 1); INSERT INT...
PHP'de sonsuz derinlikte menü yapmak için düzgün bir tablo yapısı ve çok basit bir recursive fonksiyon yeterli. Tablo Yapısı CREATE TABLE `category` ( `sid` int(12) unsigned NOT NULL auto_increment, `module` set('estate','cars') collate utf8_bin NOT NULL, `parentId` int(6) NOT NULL, `title` varchar(255) collate utf8_bin NOT NULL, `isDefault` int(1) NOT NULL default '1', PRIMARY KEY (`sid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=14 ; INSERT INTO `category` VALUES (1, 0x657374617465, 0, 0x536174c4b16cc4b16b20456d6c616b, 1); INSERT INTO `category` VALUES (2, 0x657374617465, 1, 0x45766c6572, 1); INSERT INTO `category` VALUES (3, 0x657374617465, 1, 0xc4b0c59f7965726c657269, 1); INSERT INTO `category` VALUES (4, 0x657374617465, 1, 0x417273616c6172, 1); INSERT INTO `category` VALUES (5, 0x657374617465, 0, 0x4b6972616cc4b16b20456d6c616b, 1); INSERT INTO `category` VALUES (6, 0x657374617465, 5, 0x45766c6572, 1); INSERT INT...