Imagine you’re adding records to your MySQL table—but sometimes the row exists, and you need to update instead of insert.…