CREATE TABLE IF NOT EXISTS test_table id_item int 11 NOT NULL auto_inc

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CREATE TABLE IF NOT EXISTS `test_table` (
`id_item` int(11) NOT NULL auto_increment,
`id_parent` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`order_num` int(11) NOT NULL default '0',
PRIMARY KEY (`id_item`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='latin1_swedish_ci' AUTO_INCREMENT=10 ;
--
-- Dumping data for table `test_table`
--
INSERT INTO `test_table` (`id_item`, `id_parent`, `title`, `order_num`) VALUES
(0, -1, '/', 0),
(1, 0, 'work', 1),
(2, 0, 'home', 2),
(3, 0, 'media', 3),
(4, 1, 'webserver', 1),
(5, 1, 'multimedia', 2),
(6, 1, 'software', 3),
(7, 4, 'data', 1),
(8, 4, 'logs', 2),
(9, 7, 'png.lo', 1);