para hacer tres niveles en el menú alguien sabe como puedo hacer esto ya hice por medio de una vista pero no sale.
me urge si alguien me puede ayudar de nuevo se lo agradecería.
este es el procedimiento que hice pero le falta el ultimo nivel es el problema que tengo
CREATE DATABASE /*!32312 IF NOT EXISTS*/`bdcom` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `bdcom`;
DROP TABLE IF EXISTS `tbl_categorias`;
CREATE TABLE `tbl_categorias` (
`Int_Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Vrchr_Categoria` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`Vrchr_Estado` tinytext COLLATE utf8_unicode_ci,
PRIMARY KEY (`Int_Id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `tbl_categorias` */
insert into `tbl_categorias`(`Int_Id`,`Vrchr_Categoria`,`Vrchr_Estado`) values (6,'Computadoras','s'),(9,'Componentes','s'),(10,'Impresión','s'),(11,'Conectividad','s'),(12,'Electrónica','s'),(13,'Software','s'),(17,'Servicios','s');
DROP TABLE IF EXISTS `tbl_lineas`;
CREATE TABLE `tbl_lineas` (
`Int_IdLinea` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`Int_IdCategoria` int(10) unsigned NOT NULL,
`Vrchr_Linea` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`Vrchr_Estado` tinytext COLLATE utf8_unicode_ci,
PRIMARY KEY (`Int_IdLinea`),
KEY `tbl_lineas_int_id_foreign` (`Int_IdCategoria`),
CONSTRAINT `tbl_lineas_int_id_foreign` FOREIGN KEY (`Int_IdCategoria`) REFERENCES `tbl_categorias` (`Int_Id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `tbl_lineas` */
insert into `tbl_lineas`(`Int_IdLinea`,`Int_IdCategoria`,`Vrchr_Linea`,`Vrchr_Estado`) values (14,6,'Apple','s'),(15,6,'Computo','s'),(17,10,'Impresoras Jet','s'),(18,11,'Antenas','s');
/*Table structure for table `tbl_marcas` */
DROP TABLE IF EXISTS `tbl_tipos`;
CREATE TABLE `tbl_tipos` (
`Int_IdTipo` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`Int_IdLinea` bigint(20) unsigned NOT NULL,
`Vrchr_Tipo` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`Vrchr_Estado` tinytext COLLATE utf8_unicode_ci,
PRIMARY KEY (`Int_IdTipo`),
KEY `tbl_lineas_int_id_foreign` (`Int_IdLinea`),
CONSTRAINT `tbl_lineas_int_ids_foreign` FOREIGN KEY (`Int_IdLinea`) REFERENCES `tbl_lineas` (`Int_IdLinea`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `tbl_tipos` */
insert into `tbl_tipos`(`Int_IdTipo`,`Int_IdLinea`,`Vrchr_Tipo`,`Vrchr_Estado`) values (37,15,'Accesorios De Cómputo','s'),(38,15,'All in One','s'),(39,17,'Apple Care','s'),(40,17,'MAC','s'),(41,14,'Ipod','s'),(44,15,'NUC','s'),(45,17,'Impresoras','s');
DELIMITER $$
USE `bdsyscom`$$
DROP VIEW IF EXISTS `vst_menu`$$
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vst_menu` AS (
SELECT
`tbl_categorias`.`Int_Id` AS `Int_Id`,
`tbl_categorias`.`Vrchr_Categoria` AS `Vrchr_Categoria`,
`tbl_categorias`.`Vrchr_Estado` AS `Vrchr_Estado`,
`tbl_lineas`.`Int_IdLinea` AS `Int_IdLinea`,
`tbl_lineas`.`Vrchr_Estado` AS `Estado`,
`tbl_lineas`.`Vrchr_Linea` AS `Vrchr_Linea`
FROM (`tbl_categorias`
JOIN `tbl_lineas`
ON ((`tbl_lineas`.`Int_IdCategoria` = `tbl_categorias`.`Int_Id`))))$$
DELIMITER ;
este es el procedimiento de tipos que quiero anexar el de arriba para que me genere el menu de tres niveles si me pueden ayudar se los agradeceria bastante.
DELIMITER $$
USE `bdsyscom`$$
DROP VIEW IF EXISTS `vst_tipos`$$
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vst_tipos` AS
SELECT
`tbl_tipos`.`Int_IdTipo` AS `Int_IdTipo`,
`tbl_tipos`.`Int_IdLinea` AS `Int_IdLinea`,
`tbl_tipos`.`Vrchr_Tipo` AS `Vrchr_Tipo`,
`tbl_tipos`.`Vrchr_Estado` AS `Vrchr_Estado`
FROM `tbl_tipos`$$
DELIMITER ;