Open matak opened 7 years ago
Automatic detection for INSERT try build this
(column, column) VALUES (value, value)
Let's use
$database->query("
INSERT INTO product_stock_merchant_events (x, y, z)
SELECT
x, y, z
FROM product_stock_events
WHERE id IN (?set)",
$stockEvent_ids);
this say what to do with array.
How to solve it? The source code provided above: On line 177 condition is TRUE, but on line 178 $values[0] is not array.
Throw exception with message "Automatic detection of mode faild let's define exactly set|and|or|order|values"?
Change mode from values to set|or?
Exception seems better to me.
Ok I prepare PR.
Great, thanks
Description
when you try to call insert with select it crashes on
Invalid argument supplied for foreach()