tp5查找值是否在字符串中

作者:星辰网络工作室 日期:2022-10-27 浏览:897

使用find_in_set()方法

第一种方式

where('find_in_set(:house_id,product)',['house_id'=>$house_id])

第二种方式

->where([''=>['EXP',Db::raw("FIND_IN_SET(".$where['house_id'].",a.product)")]])