I'm having an error in my query the entries that I wanna are insert are
Here is my code
insertNew(1,"bob","johnson","brown","Jr",098765432123,"bobbrown@yahoo.com","1993-12-25",0)
function insertNew($empID,$fName,$mName,$lName,$suffix,$cellNum,$email,$birthDate,$pos)
{
switch($pos)
{
case 0:
$query = "INSERT INTO vtiger_contactscf (cf_739,cf_703,cf_705) VALUES ($empID,'$mName','$suffix');
INSERT INTO vtiger_contactdetails (firstname,lastname,email,contact_no) VALUES ('$fName','$lName','$email',$cellNum);
INSERT INTO vtiger_contactsubdetails (birthday) VALUES ('$birthDate'); ";
$result = mysql_query($query) or die (mysql_error());
echo "Registration for employee successful!";
break;
}
}
I'm receiving this 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 'INSERT INTO vtiger_contactdetails (firstname,lastname,email,contact_no) VALUES (' at line 2