CREATE TABLE IF NOT EXISTS `diary_rating` ( `id_diary` int(11) NOT NULL, `id_user` int(11) NOT NULL, `rating` int(11) NOT NULL DEFAULT '0', KEY`id_diary` (`id_diary`,`id_user`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;