$query->andWhere(['or',
['in', 'order.status', ['paid', 'refunding']],
['in', 'order.refund_type', 'part'],
])
sql => and (order.status in (['paid', 'refunding') or order.refund_type in('part'))
$query->andWhere(['or',
['in', 'order.status', ['paid', 'refunding']],
['in', 'order.refund_type', 'part'],
])
sql => and (order.status in (['paid', 'refunding') or order.refund_type in('part'))
本文标题:查询条件中 and中有or条件的写法
本文链接:https://www.haomeiwen.com/subject/lsacxxtx.html
网友评论