· 8 years ago · Mar 09, 2018, 11:52 PM
1CREATE TABLE IF NOT EXISTS `comments` (
2 `id` int(5) unsigned NOT NULL auto_increment,
3 `text_id` int(5) unsigned default NULL,
4 `parent_id` int(5) unsigned default NULL,
5 `author` varchar(255) default NULL,
6 `content` text,
7 `added_at` datetime default NULL,
8 PRIMARY KEY (`id`)
9);
10
11
12INSERT INTO `comments` (`id`, `text_id`, `parent_id`, `author`, `content`, `added_at`) VALUES
13(1, 1, NULL, 'AlexeyK', 'Comment #1', '2007-11-08 18:21:15'),
14(2, 1, 1, 'AlexeyK', 'Comment #2', '2007-11-08 18:22:43'),
15(3, 1, 2, 'AlexeyK', 'Comment #3', '2007-11-08 18:22:54'),
16(4, 1, 3, 'AlexeyK', 'Comment #4', '2007-11-08 18:23:30'),
17(5, 1, 4, 'AlexeyK', 'Comment #5', '2007-11-08 18:23:38'),
18(6, 1, NULL, 'AlexeyK', 'Comment #6', '2007-11-08 20:36:07'),
19(7, 1, 6, 'AlexeyK', 'Comment #7', '2007-11-08 20:36:08'),
20(8, 1, 7, 'AlexeyK', 'Comment #8', '2007-11-08 20:36:09'),
21(9, 1, 8, 'AlexeyK', 'Comment #9', '2007-11-08 20:36:10'),
22(10, 1, 9, 'AlexeyK', 'Comment #10', '2007-11-08 20:36:11'),
23(11, 1, NULL, 'AlexeyK', 'Comment #11', '2007-11-08 20:39:45'),
24(12, 1, 11, 'AlexeyK', 'Comment #12', '2007-11-08 20:39:46'),
25(13, 1, 12, 'AlexeyK', 'Comment #13', '2007-11-08 20:39:47'),
26(14, 1, 13, 'AlexeyK', 'Comment #14', '2007-11-08 20:39:48'),
27(15, 1, 14, 'AlexeyK', 'Comment #15', '2007-11-08 20:39:49'),
28(16, 1, 1, 'Carl Cox', 'Carl''s comment', '2007-11-10 17:08:10');