赞
踩
原数据结果:
SELECT id FROM `resource` where status=0 and company_id=2 and role_id=2;
结果如下图:
逗号分隔id写法:
SELECT GROUP_CONCAT(id) as ids FROM `resource` where status=0 and company_id=2 and role_id=2
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。