Answer the question
In order to leave comments, you need to log in
How to prepare query string for multiple insert?
I have an array, for example:
[0] => Array
(
[stock_id] => 846
[order_count] => 2
[order_price] => 22
[total] => 44
[profit] => 2
[order_date] => 21.06.2021
[short_date] => 06.2021
)
[1] => Array
(
[stock_id] => 841
[order_count] => 1
[order_price] => 54
[total] => 54
[profit] => 53
[order_date] => 21.06.2021
[short_date] => 06.2021
)
VALUES (?, ?, ?, ?, ?, ?, ?),
(?, ?, ?, ?, ?, ?, ?),
.. и тд, столько, сколько записей в массиве
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question