I need to create a IN conditions on multiple columns, like this
...
WHERE
(order_date, order_number) IN (
('2016-03-11', 3455453),
('2016-03-18', 83545454),
('2016-06-17', 5354544)
)
starting from an array like this:
$orders = [
['2016-03-11', 3455453],
['2016-03-18', 83545454],
['2016-06-17', 5354544]
];
using cake3 query builder. I tried with
->where(['(order_date, order_number) IN' => $orders]);
but I get an error:
Cannot convert value to string
I know it's not hard to manually create the query manipulating the array, but I'd like to know if there is a cake way to do it.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…