Php SQL表错误Magento
这很奇怪,有人知道为什么会出现错误吗Php SQL表错误Magento,php,sql,magento,Php,Sql,Magento,这很奇怪,有人知道为什么会出现错误吗 ------------------------------------------------------ -- -- -- Table structure for table `mg_cataloginventory_stock` -- CREATE TABLE IF NOT EXISTS `mg_cataloginventory_stock` ( `stock_id` SMALLINT( 5 ) UNSIGNED NOT NULL AUTO
------------------------------------------------------ --
--
-- Table structure for table `mg_cataloginventory_stock`
--
CREATE TABLE IF NOT EXISTS `mg_cataloginventory_stock` (
`stock_id` SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Stock Id',
`stock_name` VARCHAR( 255 ) DEFAULT NULL COMMENT 'Stock Name',
PRIMARY KEY ( `stock_id` )
) ENGINE = INNODB DEFAULT CHARSET = utf8 COMMENT = 'Cataloginventory Stock';
MySQL said: Documentation
#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 '--------------------------------------------------------
--
-- Table structu' at line 1
看来你的
从“-”序列到行尾。在MySQL中,“-”(双破折号)注释样式要求第二个破折号后面至少有一个空格或控制字符(如空格、制表符、换行符等)
应该是这样的:
-- ------------------------------------------------------
--
-- Table structure for table `mg_cataloginventory_stock`
--