問題:
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