问题:
I have this MySQL query.我有这个 MySQL 查询。
I have database fields with this contents我有包含此内容的数据库字段
sports,shopping,pool,pc,games
shopping,pool,pc,games
sports,pub,swimming, pool, pc, games
Why does this like query does not work?为什么这样的查询不起作用? I need the fields with either sports or pub or both?我需要有运动场或酒吧或两者兼而有之的场地?
SELECT * FROM table WHERE interests LIKE ('%sports%', '%pub%')
解决方案:
参考一: https://en.stackoom.com/question/HVNT参考二: https://stackoom.com/question/HVNT