close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

database table drive menu and submenus

Thread began 8/04/2010 12:19 pm by andres411923 | Last modified 8/05/2010 12:13 pm by andres411923 | 776 views | 1 replies

andres411923

database table drive menu and submenus

I have a table that have all levels of menu and submenu, i have a field call parent_id, witch relational the id menu.

see this example (dababase on MYSQL)

-- ----------------------------
-- TABLE STRUCTURE FOR SHOPEXAMPLE
-- ----------------------------
DROP TABLE IF EXISTS `SHOPEXAMPLE`;
CREATE TABLE `SHOPEXAMPLE` (
`ID` INT(11) NOT NULL AUTO_INCREMENT,
`LABEL` VARCHAR(40) DEFAULT NULL,
`PARENT_ID` INT(11) DEFAULT NULL,
`TOOLTIP` VARCHAR(40) DEFAULT NULL,
`ORDERBY` INT(11) DEFAULT NULL,
`URL` VARCHAR(60) DEFAULT NULL,
`VISIBILITY` INT(11) DEFAULT '1',
PRIMARY KEY (`ID`)
) ENGINE=INNODB AUTO_INCREMENT=19 DEFAULT CHARSET=LATIN1;

-- ----------------------------
-- RECORDS
-- ----------------------------
INSERT INTO `SHOPEXAMPLE` VALUES ('1', 'WELCOME', '0', 'WELCOME TO OUR SITE', '1', 'WELCOME.PHP',
'1');
INSERT INTO `SHOPEXAMPLE` VALUES ('2', 'ABOUT US', '0', 'ABOUT US', '2', 'ABOUTUS.PHP', '1');
INSERT INTO `SHOPEXAMPLE` VALUES ('3', 'OUR TERMS', '0', 'OUR TERMS', '3', 'OURTERMS.PHP', '1');
INSERT INTO `SHOPEXAMPLE` VALUES ('4', 'OUR PRODUCTS', '0', 'OUR PRODUCTS', '4', NULL, '1');
INSERT INTO `SHOPEXAMPLE` VALUES ('5', 'BUY NOW', '0', 'BUY NOW', '5', 'BUYNOW.PHP', '1');
INSERT INTO `SHOPEXAMPLE` VALUES ('6', 'SHOES', '4', 'SHOES', '6', NULL, '1');
INSERT INTO `SHOPEXAMPLE` VALUES ('7', 'COATS', '4', 'COATS', '7', NULL, '1');
INSERT INTO `SHOPEXAMPLE` VALUES ('8', 'SCARVES', '4', 'SCARVES', '8', NULL, '1');
INSERT INTO `SHOPEXAMPLE` VALUES ('9', 'UMBRELLAS', '4', 'UMBRELLAS', '9', NULL, '1');
INSERT INTO `SHOPEXAMPLE` VALUES ('10', 'BLACK SHOES', '6', 'BLACK SHOES', '10', 'BLACKSHOES.PHP', '1');
INSERT INTO `SHOPEXAMPLE` VALUES ('11', 'BROWN SHOES', '6', 'BROWN SHOES', '11', 'BROWNSHOES.PHP',
'1');
INSERT INTO `SHOPEXAMPLE` VALUES ('12', 'SUMMER COATS', '7', 'SUMMER COATS', '12',
'SUMMERCOATS.PHP', '1');
INSERT INTO `SHOPEXAMPLE` VALUES ('13', 'WINTER COATS', '7', 'WINTER COATS', '13', 'WINTERCOATS', '1');
INSERT INTO `SHOPEXAMPLE` VALUES ('14', 'SILK SCARVES', '8', 'SILK SCARVES', '14', 'SILKSCARVES.PHP', '1');
INSERT INTO `SHOPEXAMPLE` VALUES ('15', 'WOOL SCARVES', '8', 'WOOL SCARVES', '15',
'WOOLSCARVES.PHP', '1');
INSERT INTO `SHOPEXAMPLE` VALUES ('16', 'PATTERNED SCRAVES', '8', 'PATTERNED SCARVES', '16',
'PATTERNEDSCRAVES.PHP', '1');
INSERT INTO `SHOPEXAMPLE` VALUES ('17', 'LADIES UMBRELLAS', '9', 'LADIES UMBRELLAS', '17',
'LADIESUMBRELLAS.PHP', '1');
INSERT INTO `SHOPEXAMPLE` VALUES ('18', 'GENTS UNMBRELLAS', '9', 'GENTS UMBRELLAS', '18',
'GENTSUMBRELLAS.PHP', '1');

can i us css menu writer for create all levels menu?

thank you.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...