PHP中laravel拼接原生语句使用find_in_set
时间:2017-10-25 19:27:54
收藏:0
阅读:1630
$where = "(‘1=1‘)";
$where .= ‘and FIND_IN_SET(‘ . intval($request->get(‘city‘)) . ‘,city)‘;
$uids = CompanyArea::whereRaw($where)->get();
return $uids;
处理特殊情况用,一般情况下性能较差,不建议使用
原文:http://www.cnblogs.com/chen1970s/p/7731469.html
评论(0)