I have
$sql = 'INSERT INTO Events ('.$names.') VALUES ('.$values.')';
//$names - string of all row names, $value - very long string with values
mysqli_query($mysqli, $sql) or die ($sql);
And mostly it does work, however sometimes I get similar error
Warning: Error while sending QUERY packet. PID=10828 in /insert.php on line 107
INSERT INTO Events (work_hours, …) VALUES ('2015-06-28 11:00 (sekmadienis)', …)
Line 107 where mysqli_query is.
These … stand for my strings.
When I write all that $sql value directly to phpMyAdmin everything is OK — such query is inserted.
So my question is how to avoid that PID
error and who causes it?