Php and MySQL GROUP_CONCAT with separator comma and search where concat by comma

前提是你 提交于 2019-12-06 03:09:04

Try this:

SELECT 
    products_id , 
    GROUP_CONCAT(options_values_id SEPARATOR ',') as ops 
FROM 
    products_attributes 
GROUP by 
    products_id
HAVING
    FIND_IN_SET('1',ops)
    OR FIND_IN_SET('3',ops)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!