I have to insert 1000 records to read from file and insert to db but my code is not working more than 100 times. It says internal server 500
but it works fine when I run code below 100 times. Are there any settings that I have to apply to insert more than 100 records?
Here is my code:
<?php
$servername = "**";
$username = "**";
$password = "**";
$dbname = "**";
$con=mysqli_connect($servername, $username, $password,$dbname);
for($i=0; $i<400; $i++){
$query = mysqli_query($con,"INSERT INTO table_name (column1, column2, column3)
VALUES (value1, value2, value3)");
}
$query->close();
$con->close();
?>
It's working only 100 times. If I set loop to run more than than that, it does not work any ideas?