无法创建表

来源:2-4 将表的结构导入数据库中

张逸安

2018-05-22

直接用老师给的 sql 文件报错, 怎么回事?

ERROR 1064 (42000): 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 

写回答

2回答

singwa

2018-05-22

您好。  sql贴下我看看

0
4
张逸安
非常感谢!
2018-05-22
共4条回复

张逸安

提问者

2018-05-22

#生活服务表
CREATE TABLE `o2o_category`(
    `id` int(10) unsigned NOT NULL auto_increment,
    `name` varchar(50) NOT NULL DEFAULT '',
    `parend_id` int(10) unsigned NOT NULL default 0,
    `listorder` int(8) unsigned NOT NULL default 0,
    `status` tinyint(1) NOT NULL DEFAULT 0,
    `create_time` int(10) unsigned NOT NULL default 0,
    `update_time` int(10) unsigned NOT NULL default 0,
    PRIMARY KEY (`id`),
    KEY parend_id(`parend_id`)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

#城市表
CREATE TABLE `o2o_city`(
    `id` int(10) unsigned NOT NULL auto_increment,
    `name` varchar(50) NOT NULL DEFAULT '',
    `uname` varchar(50) NOT NULL DEFAULT '',
    `parend_id` int(10) unsigned NOT NULL default 0,
    `listorder` int(8) unsigned NOT NULL default 0,
    `status` tinyint(1) NOT NULL DEFAULT 0,
    `create_time` int(10) unsigned NOT NULL default 0,
    `update_time` int(10) unsigned NOT NULL default 0,
    PRIMARY KEY (`id`),
    KEY parend_id(`parend_id`),
    UNIQUE KEY uname(`uname`)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;


0
0

Thinkphp5.0仿百度糯米开发多商家电商平台

【毕设】BAT大牛亲授ThinkPHP 5.0,实战中学透新技能,应用于工作

2439 学习 · 1712 问题

查看课程