Hvordan tilføjer jeg undermenu i databasen?
jeg har en menu men tilhørene mysql database. Jeg har opsat det hele på min server og der virker helt fint. Nu er der så det problem at jeg gerne vil have tilføjet en undermenu til hovedmenu´en. Det hele er sat op til at kunne dette, men jeg kan bare ikke finde ud af det jeg syntes at have prøvet alt.Database opbygningen ser sådanne ud:
# Table structure for table 'main_content'
#
CREATE TABLE main_content (
id int(11) DEFAULT '0' NOT NULL,
contentEnglish text NOT NULL,
contentGerman text NOT NULL,
contentFrench text NOT NULL,
PRIMARY KEY (id)
);
#
# Dumping data for table 'main_content'
#
INSERT INTO main_content VALUES ( '1', '<p>
<font face=\"arial\" size=\"2\">Welcome to the demo
</font>', '', '');
# --------------------------------------------------------
#
# Table structure for table 'menu_headings'
#
CREATE TABLE menu_headings (
id int(11) NOT NULL auto_increment,
headingEnglish varchar(50) NOT NULL,
headingGerman varchar(50) NOT NULL,
headingFrench varchar(50) NOT NULL,
PRIMARY KEY (id)
);
#
# Dumping data for table 'menu_headings'
#
INSERT INTO menu_headings VALUES ( '1', ' Welcome', '', '');
INSERT INTO menu_headings VALUES ( '2', 'Sales', '', '');
INSERT INTO menu_headings VALUES ( '3', 'Human Resources', '', '');
INSERT INTO menu_headings VALUES ( '4', 'Engineering', '', '');
INSERT INTO menu_headings VALUES ( '5', 'I.T. Department', '', '');
# --------------------------------------------------------
#
# Table structure for table 'sub_menu_content'
#
CREATE TABLE sub_menu_content (
id int(11) DEFAULT '0' NOT NULL,
contentEnglish text NOT NULL,
contentGerman text NOT NULL,
contentFrench text NOT NULL,
PRIMARY KEY (id)
);
#
# Dumping data for table 'sub_menu_content'
#
INSERT INTO sub_menu_content VALUES ( '6', '<P>
This is the CAD section of the engineering department.', '', '');
# --------------------------------------------------------
#
# Table structure for table 'sub_menu_items'
#
CREATE TABLE sub_menu_items (
heading_num int(11) DEFAULT '0' NOT NULL,
sub_menu_num int(11) NOT NULL auto_increment,
itemnameEnglish varchar(50) NOT NULL,
itemnameGerman varchar(50) DEFAULT '0' NOT NULL,
itemnameFrench varchar(50) NOT NULL,
PRIMARY KEY (sub_menu_num)
);
#
# Dumping data for table 'sub_menu_items'
#
INSERT INTO sub_menu_items VALUES ( '2', '1', 'Presentations', '', '');
INSERT INTO sub_menu_items VALUES ( '2', '2', 'Products', '', '');
INSERT INTO sub_menu_items VALUES ( '2', '3', 'Pricing', '', '');
INSERT INTO sub_menu_items VALUES ( '3', '4', 'Contracts', '', '');
INSERT INTO sub_menu_items VALUES ( '3', '5', 'Directives', '', '');
INSERT INTO sub_menu_items VALUES ( '4', '6', 'CAD', '', '');
INSERT INTO sub_menu_items VALUES ( '5', '7', 'Email Policy', '', '');
INSERT INTO sub_menu_items VALUES ( '5', '8', 'Security', '', '');
INSERT INTO sub_menu_items VALUES ( '5', '9', 'Training', '', '');
INSERT INTO sub_menu_items VALUES ( '5', '10', 'FAQ', '', '');
Håber i ud fra dette kan hjælpe mig elleres spørger i jo bare.
