В чем может быть проблемма, помогите.
Ошибка
Вероятно, SQL-запрос содержит ошибку. При наличии таковой, ниже будет выведена ошибка MySQL-сервера, облегчающая диагностику проблемы.
ERROR: Незакрытая кавычка @ 753
STR: '
SQL:
CREATE TABLE `diary` (
`diary_id` smallint(4) unsigned NOT NULL AUTO_INCREMENT,
`diary_title` varchar(90) NOT NULL,
`diary_text` text NOT NULL,
`diary_user` varchar(20) NOT NULL,
`diary_time` int(11) unsigned NOT NULL DEFAULT '0',
`diary_comm` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`diary_id`),
KEY 'diary_time` (`diary_time`)
) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
--
-- Дамп данных таблицы `diary`
--
--
-- Структура таблицы `diary_c`
--
DROP TABLE IF EXISTS `diary_c`;
CREATE TABLE `diary_c` (
`c_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`c_diary` smallint(4) unsigned NOT NULL,
`c_text` text NOT NULL,
`c_user` varchar(20) NOT NULL,
`c_time` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`c_id`),
KEY `c_diary` (`c_diary`),
KEY `c_time` (`c_time`)
) ENGINE=MyISAM AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;
SQL-запрос:
CREATE TABLE `diary` ( `diary_id` smallint(4) unsigned NOT NULL AUTO_INCREMENT, `diary_title` varchar(90) NOT NULL, `diary_text` text NOT NULL, `diary_user` varchar(20) NOT NULL, `diary_time` int(11) unsigned NOT NULL DEFAULT '0', `diary_comm` mediumint(8) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`diary_id`), KEY 'diary_time` (`diary_time`) ) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; -- -- Дамп данных таблицы `diary` -- -- -- Структура таблицы `diary_c` -- DROP TABLE IF EXISTS `diary_c`; CREATE TABLE `diary_c` ( `c_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `c_diary` smallint(4) unsigned NOT NULL, `c_text` text NOT NULL, `c_user` varchar(20) NOT NULL, `c_time` int(11) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`c_id`), KEY `c_diary` (`c_diary`), KEY `c_time` (`c_time`) ) ENGINE=MyISAM AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;
Ответ MySQL:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''diary_time` (`diary_time`)
) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=ut' at line 9