php pdo multi array insert

后端 未结 2 1968
没有蜡笔的小新
没有蜡笔的小新 2021-01-19 19:04

I\'ve been playing around for few hours and trying to sort this out but looks like a hard nut to crack.

I\'m able to do a single array insertion

$pe         


        
2条回答
  •  温柔的废话
    2021-01-19 19:14

    You cannot do that automatically. Instead you have to iterate it manually and execute each record:

    for ($person as $row) {
        $sth->execute($row);
    }
    

提交回复
热议问题