Yii使用 case when 来模糊排序查询
Yii使用 case when 来模糊排序查询
$search_arr=['沙发','床','现代轻奢','新中式'];//越排在前面得关键词,优先模糊排序
$where=[];
$order_by="";
$query = Goods::find()->alias('g')->where([
'g.status' => 1,
'g.is_delete' => 0,
'g.type' => ge
转载
2021-03-05 17:04:10 ·
390 阅读 ·
0 评论