0

I am basically looking to save an error to a MySql database.

So If a query fails the error will be saved to a MySQL table?

if ($conn->query($sql) === TRUE) {}
else
{      
$sql1 = "INSERT INTO audit_hr_employees 
(tab, employee, error_type, user, result, other)
VALUES ('4a', '$employee', 'warning', '$user', 'Error', '$sql')";
}

As you can see from the above example I have tried adding $sql into the database however it does not show anything.

This is not a duplicate of the last link that has been posted.

Shane
  • 753
  • 3
  • 8
  • 21

0 Answers0