日期:2014-05-16  浏览次数:20675 次

谁帮我看看这条语句错在哪里啊
SELECT   `id`,   `name`,   `gender`,   `group`,   `birthstamp`,   `phone`,   `tel`   FROM   ac_list   WHERE   group   LIKE   '%;1134;% '   ORDER   BY   `name`   LIMIT   0,   30

错误是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   'group   LIKE   '%;1134;% '   ORDER   BY   `name`   LIMIT   0,   30 '   at   line   1

难道说LIKE不能这么用?

------解决方案--------------------
SELECT `id`, `name`, `gender`, `group`, `birthstamp`, `phone`, `tel` FROM ac_list WHERE `group` LIKE '%;1134;% ' ORDER BY `name` LIMIT 0, 30


group 是关键词。
也必须用反引号括住。