This works with delete:
$stmt = $con->prepare("DELETE FROM employees WHERE id = ? LIMIT 1");
But this same logic does not work with insert:
$stmt = $con->prepare("INSERT INTO employees (first_name, last_name, position, date, updated) VALUES (?, ?, ?, ?, ?) LIMIT 1") ;
The error is just a basic one, looks like that is returns false: Uncaught Error: Call to a member function bind_param() on boolean
This article's example Using LIMIT 1 in MySQL using INSERT INTO .. SELECT ... LIMIT 1
would be nice with an actual example (if it is even the right way).
The only other article I could find, Use "LIMIT" in a MySQL "INSERT"?, did not seem to have a definite answer.
And yes, putting a Limit 1 would be useful. I realized with my database if you click the save button 2-3 times it will insert the data 2 or 3 times. As a test, I clicked the save button ten times and it entered it in ten tinmes.
Thanks.