我的表格如下:
id | tags
---------------------------------
974 | Hip-Hop;Rap
984 | Hip-Hop;Underground Hip-Hop
我想查询不同的标签并获取id。例如
$searchTags=['Rap','Unterground Hip-Hop'];
$table = TableRegistry::get('MyTable')->find();
$songIds = $table->select(['id'])
->where(['tags IN LIKE' => $searchTags]);
是否有可能将IN和LIKE结合起来进行另一种解决方案?