I have a file with 50000 rows. I make a code but it skips lots of row and pages.When i enter in phpmyadmin to look i have like so 1-10 then it start to skip 23-34 78 102 345 546 etc. i think i has something with the execution.
$contents = file_get_contents("testinsert.txt");
$data = explode(PHP_EOL, $contents);
$query = "INSERT INTO table (`name`) VALUES (?)";
$zz = $conn->prepare($query);
$zz ->bind_param("i", $bb);
$conn->query("START TRANSACTION");
foreach ($data as $bb) {
$zz->execute();`
}
$zz->close();
$conn->query("COMMIT");
$zz->execute();`