This code is throwing an error i tried to troubleshoot but I'm missing something . Since I wrote it I'm overlooking a syntax error. Any help ?
$kql="
INSERT INTO References (Email, Company1, Person1, Contact1, Company2, Person2, Contact2, Company3, Person3, Contact3, Company4, Person4, Contact4, Company5, Person5, Contact5)
VALUES ( '$company44','$Company', '$Person', '$Contact', '$Company1', '$Person1', '$Contact1', '$Company2', '$Person2', '$Contact2', '$Company3', '$Person3', '$Contact3', '$Company4', '$Person4', '$Contact4')";
The error is
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'References (Email, Company1, Person1, Contact1, Company2, Person2, Contact2, Com' at line 1

Referencesis actually a keyword (atleast for MySQL). Try doing a simpleSELECTin the table, if the error still occurs$personwas a "Mr O'brien" his name would close your quotation mark in the middle of his name, causing a new syntax error.