Skip to content

Commit 5b1d3a3

Browse files
Moved the prepare statement out of the for loop for the install process.
1 parent e746c08 commit 5b1d3a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

install.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@
3030
],
3131
];
3232

33+
$stmt = $mysqli->prepare("INSERT INTO `users`(`username`, `password`, `name`) VALUES (?, ?, ?);");
34+
3335
foreach ($userData as $id => $userDatum) {
34-
$stmt = $mysqli->prepare("INSERT INTO `users`(`username`, `password`, `name`) VALUES (?, ?, ?);");
3536
$stmt->bind_param("sss", ...$userDatum);
3637
$stmt->execute();
3738
}

0 commit comments

Comments
 (0)