Ответ 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 '"DROP TABLE IF EXISTS ` videos`"' at line 1
Вероятно, SQL-запрос содержит ошибку. При наличии таковой, ниже будет выведена ошибка MySQL-сервера, облегчающая диагностику проблемы.
ERROR: Неизвестная пунктуация @ 1
STR: <?
SQL: <?php
DROP TABLE IF EXISTS `videos`";
CREATE TABLE `videos` (
`id` int(11) NOT NULL auto_increment,
`title` varchar(255) collate utf8_general_ci NOT NULL,
`main` text collate utf8_general_ci NOT NULL,
`views` int(11) default '0',
`date` datetime default NULL,
`section_id` int(11) NOT NULL,
`category_id` int(11) NOT NULL,
`author_id` int(11) NOT NULL,
`comments` int(11) NOT NULL default '0',
`tags` VARCHAR( 255 ) NOT NULL,
`description` TEXT NOT NULL,
`sourse` VARCHAR( 255 ) NOT NULL,
`sourse_email` VARCHAR( 255 ) NOT NULL,
`sourse_site` VARCHAR( 255 ) NOT NULL,
`commented` ENUM( '0', '1' ) DEFAULT '1' NOT NULL,
`available` ENUM( '0', '1' ) DEFAULT '1' NOT NULL,
`view_on_home` ENUM( '0', '1' ) DEFAULT '1' NOT NULL,
`on_home_top` ENUM( '0', '1' ) DEFAULT '0' NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci";<?php
DROP TABLE IF EXISTS `videos`";
CREATE TABLE `videos` (
`id` int(11) NOT NULL auto_increment,
`title` varchar(255) collate utf8_general_ci NOT NULL,
`main` text collate utf8_general_ci NOT NULL,
`views` int(11) default '0',
`date` datetime default NULL,
`section_id` int(11) NOT NULL,
`category_id` int(11) NOT NULL,
`author_id` int(11) NOT NULL,
`comments` int(11) NOT NULL default '0',
`tags` VARCHAR( 255 ) NOT NULL,
`description` TEXT NOT NULL,
`sourse` VARCHAR( 255 ) NOT NULL,
`sourse_email` VARCHAR( 255 ) NOT NULL,
`sourse_site` VARCHAR( 255 ) NOT NULL,
`commented` ENUM( '0', '1' ) DEFAULT '1' NOT NULL,
`available` ENUM( '0', '1' ) DEFAULT '1' NOT NULL,
`view_on_home` ENUM( '0', '1' ) DEFAULT '1' NOT NULL,
`on_home_top` ENUM( '0', '1' ) DEFAULT '0' NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci";<?php
DROP TABLE IF EXISTS `videos`";
CREATE TABLE `videos` (
`id` int(11) NOT NULL auto_increment,
`title` varchar(255) collate utf8_general_ci NOT NULL,
`main` text collate utf8_general_ci NOT NULL,
`views` int(11) default '0',
`date` datetime default NULL,
`section_id` int(11) NOT NULL,
`category_id` int(11) NOT NULL,
`author_id` int(11) NOT NULL,
`comments` int(11) NOT NULL default '0',
`tags` VARCHAR( 255 ) NOT NULL,
`description` TEXT NOT NULL,
`sourse` VARCHAR( 255 ) NOT NULL,
`sourse_email` VARCHAR( 255 ) NOT NULL,
`sourse_site` VARCHAR( 255 ) NOT NULL,
`commented` ENUM( '0', '1' ) DEFAULT '1' NOT NULL,
`available` ENUM( '0', '1' ) DEFAULT '1' NOT NULL,
`view_on_home` ENUM( '0', '1' ) DEFAULT '1' NOT NULL,
`on_home_top` ENUM( '0', '1' ) DEFAULT '0' NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci";<?php
DROP TABLE IF EXISTS `videos`";
CREATE TABLE `videos` (
`id` int(11) NOT NULL auto_increment,
`title` varchar(255) collate utf8_general_ci NOT NULL,
`main` text collate utf8_general_ci NOT NULL,
`views` int(11) default '0',
`date` datetime default NULL,
`section_id` int(11) NOT NULL,
`category_id` int(11) NOT NULL,
`author_id` int(11) NOT NULL,
`comments` int(11) NOT NULL default '0',
`tags` VARCHAR( 255 ) NOT NULL,
`description` TEXT NOT NULL,
`sourse` VARCHAR( 255 ) NOT NULL,
`sourse_email` VARCHAR( 255 ) NOT NULL,
`sourse_site` VARCHAR( 255 ) NOT NULL,
`commented` ENUM( '0', '1' ) DEFAULT '1' NOT NULL,
`available` ENUM( '0', '1' ) DEFAULT '1' NOT NULL,
`view_on_home` ENUM( '0', '1' ) DEFAULT '1' NOT NULL,
`on_home_top` ENUM( '0', '1' ) DEFAULT '0' NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci";
SQL-запрос:
<?php DROP TABLE IF EXISTS `videos`"; CREATE TABLE `videos` ( `id` int(11) NOT NULL auto_increment, `title` varchar(255) collate utf8_general_ci NOT NULL, `main` text collate utf8_general_ci NOT NULL, `views` int(11) default '0', `date` datetime default NULL, `section_id` int(11) NOT NULL, `category_id` int(11) NOT NULL, `author_id` int(11) NOT NULL, `comments` int(11) NOT NULL default '0', `tags` VARCHAR( 255 ) NOT NULL, `description` TEXT NOT NULL, `sourse` VARCHAR( 255 ) NOT NULL, `sourse_email` VARCHAR( 255 ) NOT NULL, `sourse_site` VARCHAR( 255 ) NOT NULL, `commented` ENUM( '0', '1' ) DEFAULT '1' NOT NULL, `available` ENUM( '0', '1' ) DEFAULT '1' NOT NULL, `view_on_home` ENUM( '0', '1' ) DEFAULT '1' NOT NULL, `on_home_top` ENUM( '0', '1' ) DEFAULT '0' NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci";
Ответ 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 '<?php
DROP TABLE IF EXISTS `videos`";
CREATE TABLE `videos` (
`id` int(11)' at line 1