0
为什么我从这里得到一个错误?什么导致此MySQL查询中的语法错误?
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 'read, compose, reply, moderate FROM article_permissions' at line 2
SELECT permission_id, category_id, group_id, read, compose, reply, moderate FROM article_permissions WHERE category_id = 6 AND group_id = 0 ORDER BY permission_id DESC LIMIT 1
这是表:
CREATE TABLE IF NOT EXISTS `article_permissions` ( `permission_id` int(15) NOT NULL AUTO_INCREMENT, `category_id` int(15) NOT NULL, `group_id` int(15) NOT NULL, `read` tinyint(1) NOT NULL, `compose` tinyint(1) NOT NULL, `reply` tinyint(1) NOT NULL, `moderate` tinyint(1) NOT NULL, PRIMARY KEY (`permission_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
是啊。它做到了。谢谢! – ShoeLace1291
+1直接链接到5.7手册!先生,你领先于曲线。 –
@ ShoeLace1291:不客气,很高兴帮助。 :-) –