用户
 找回密码
 入住 CI 中国社区
搜索
查看: 1598|回复: 1
收起左侧

请教MySQL语法知识

[复制链接]
发表于 2016-6-18 13:29:02 | 显示全部楼层 |阅读模式
CREATE TABLE 'ci_sessions' (
'session_id' varchar(40)  COLLATE utf8_bin NOT NULL DEFAULT '0',
'ip_address' varchar(16)  COLLATE utf8_bin NOT NULL DEFAULT '0',
'user_agent' varchar(120) COLLATE utf8_bin DEFAULT NULL,
'last_activity' int(10) unsigned NOT NULL DEFAULT '0',
'user_data' text COLLATE utf8_bin NOT NULL,
PRIMARY KEY ('session_id'),
KEY 'last_activity_idx' ('last_activity')
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

错误
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''ci_sessions' (
'session_id' varchar(40) CHARACTER SET utf8 COLLATE utf8_bin NO' at line 1
 楼主| 发表于 2016-6-18 16:01:22 | 显示全部楼层
2小时惨案,已解决

本版积分规则