我可以使用 likeCONCAT
吗?我找不到任何其他说明的地方。我正在尝试以下并给出错误:
SELECT *, (select count(*) from acts where bookingType like '%CONCAT(bookingTypes_id, ',')%') as how_many FROM bookingTypes order by bookingType
注意:我使用CONCAT
逗号是因为该bookingType
字段基本上是一个逗号分隔的数字列表,例如 40,14,45 - 我不能只搜索例如 4,因为它会显示什么时候不应该 - 有没有更好的方法来在该字段中搜索?