insert is working in phpmyadmin but I can't figure out why it suddenly stopped working in my php code. The table itself has 2 columns, 1 is auto incremented the other is the value I attempt to insert. When the table hits 99760 entries inserts from the php script have no effect, however it's possible to insert values from phpmyadmin. The most recent summoner_id entered was 410893 and here is a link to an image of the table structure window: http://puu.sh/9KKuA/35cfcae788.png
<?php
$con=mysqli_connect("localhost", "root", "pass", "stats");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$position = $_GET["count"];
$ids = strval($position);
for($i = $position + 1; $i < $position + 40; $i++)
{
$ids = $ids . "," . strval($i);
}
do
{
sleep(1);
$raw = file_get_contents('https://euw.api.pvp.net/api/lol/euw/v1.4/summoner/' . $ids . '?api_key=****');
}while(strcmp($http_response_header[0], 'HTTP/1.1 429 429') == 0);
if(strcmp($http_response_header[0], 'HTTP/1.1 404 Not Found') == 0)
{
return;
}
$data = json_decode($raw, true);
foreach($data as &$summoner)
{
if($summoner["summonerLevel"] == 30)
{
$sql="INSERT INTO `active_summoners`(`summoner_id`) VALUES (" . $summoner["id"] . ")";
if (!mysqli_query($con,$sql))
{
echo "Error: " . mysqli_error($con);
}
}
}
?>