$i++) {
$values[] = [
'name' => 'name' . $i,
'author_id' => rand(1, 10),
'price' => rand(500, 10000),
];
}
$sql = "INSERT INTO books (name, author_id, price) values (?, ?, ?)”;
$sth = $pdo->prepare($sql);
foreach ($values as $value) {
$sth->execute(array_values($value));
}
$builder->table('books')->insert($values);