Answer the question
In order to leave comments, you need to log in
How to insert several rows into the database in php through prepared queries?
There is a code:
$command = \Yii::$app->db->createCommand(
"INSERT DELAYED INTO table_name
(id, phone, title, name, price)
VALUES
(:id, :phone, :title, :name, :price);");
$command->bindValues([":id" => $id,
":phone" => $phone,
":title" => $title,
":name" => $name,
":price" => $price]);
$command->query();
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