menu | program #--------------------------------------------------------
# Structure of the datasheet ' menu '
# --------------------------------------------------------
CREATE TABLE Menu (
menu_id Int (one) not NULL auto_increment,
Menu varchar Not NULL,
Menu_grade Int (one) not NULL,
Menu_superior Int (one) not NULL,
UNIQUE menu_id (menu_id)
);
# -------------------------------------------------
#数据表内的内容, depending on the specific circumstances
# -------------------------------------------------
INSERT into Menu VALUES (' 1 ', ' computer ', ' 1 ', ' 0 ');
INSERT into Menu VALUES (' 2 ', ' Programming ', ' 2 ', ' 1 ');
INSERT into Menu VALUES (' 3 ', ' Network ', ' 2 ', ' 1 ');
INSERT into Menu VALUES (' 4 ', ' PHP and MySQL ', ' 3 ', ' 2 ');
INSERT into Menu VALUES (' 5 ', ' C language ', ' 3 ', ' 2 ');
INSERT into Menu VALUES (' 6 ', ' web Making ', ' 3 ', ' 3 ');
INSERT into Menu VALUES (' 7 ', ' TCP, IP protocol ', ' 3 ', ' 3 ');
INSERT into Menu VALUES (' 8 ', ' Math ', ' 1 ', ' 0 ');
INSERT into Menu VALUES (' 9 ', ' Higher Mathematics ', ' 2 ', ' 8 ');
INSERT into menu VALUES (' 10 ', ' linear Algebra ', ' 3 ', ' 9 ');
INSERT into menu VALUES (' 11 ', ' Discrete Math ', ' 3 ', ' 9 ');
INSERT into Menu VALUES (' 12 ', ' Elementary math ', ' 2 ', ' 8 ');
INSERT into menu VALUES (' 13 ', ' literature ', ' 1 ', ' 0 ');
INSERT into Menu VALUES (' 14 ', ' Chinese Literature ', ' 2 ', ' 13 ');
INSERT into Menu VALUES (', ' php ', ' 4 ', ' 4 ');
INSERT into Menu VALUES (', ' MySQL ', ' 4 ', ' 4 ');
?
Tree-type directory structure template program
Menu Directory Gallery Field Description:
MENU_ID menu item ID
Menu Name
Menu_grade Menu Level 1 Main Menu 2 is level two menu ...
Menu_superior Top level Menu ID number
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.