使用多个or的复杂查询: AND ((`name`='张三') OR (`name`='李四') OR (`name`='王五')) // AND ((
使用多个or的复杂查询:
AND ((`name`='张三') OR (`name`李四王五'))
// AND ((`name`='张三') OR (`name`='李四') OR (`name`='王五'))
$query->andWhere(['or',
['name' => '张三'],1)">
['name' => '李四'],1)">
['name' => '王五']
]);
AND (((name=‘张三’) AND (phone=‘15200000000’)) OR ((name=‘李四’) 15300000000’)))
AND (((`name`='张三') AND (`phone`='15200000000')) OR ((`name`='李四') AND (`phone`='15300000000')))
['and',1)">
['name' => '张三'],1)">
['phone' => '15200000000']
],1)">
['name' => '李四'],1)">
['phone' => '15300000000']
]
]);