CREATE TABLE IF NOT EXISTS `diary` (
`id` int(11) NOT NULL
AUTO_INCREMENT,
`id_cat` int(11) NOT NULL,
`name` varchar(64) NOT
NULL,
`msg` varchar(10000) NOT NULL,
`id_user` int(11) NOT NULL,
`readers` set('0','1','2') NOT NULL DEFAULT '0',
`viewings` int(11) NOT
NULL DEFAULT '0',
`rating` int(11) NOT NULL DEFAULT '0',
`tags`
varchar(128) DEFAULT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY
(`id`,`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;