Hi all
I'm having a little trouble with a mysql insert that I just can't figure out.
I have a text file with about 200 lines that look like this:
[08.01.2008 00 35 15] ->PBSV Player GUID Computed 123456789101213141516171819 (slot #1) 255.255.255.255 58130 name
I'm splitting it up into an array with this:
$contents = file("GUID.log"); //read all of file into an array
foreach($contents as $line)
{
$parts = explode(" ",$line); //get individual entries that are separated by a space
$date = "$parts[0]";
$h = "$parts[1]";
$m = "$parts[2]";
$s = "$parts[3]";
$guid = "$parts[9]";
$ip = "$parts[12]";
$name = "$parts[14]";
This returns:
[08.01.2008 00 35 15] 123456789101213141516171819 255.255.255.255 name
Then when I try to insert it into the DB with this:
$insert = "INSERT INTO players (date, guid, ip, name) VALUES ('$date $h:$m:$s', '$guid', '$ip', '$name' )";
$add_member = mysql_query($insert); }
It will only perform a maximum number of 126 inserts. I've spent the past two days trying all sorts of different ways of doing this, but always stops at 126 and I know there are over 200 entries to insert.
Can anybody shed any light on this?? It's sending me slightly insane!!