I’m using PHP and MySQL to call a couple of commands. There is a group-employee cross-reference table, and employees may be added or removed from the group. I’m writing this feature by first removing all the employees and then adding back in each employee that is in the table if the group is modified. But I want to make sure that all the commands go through or else have the table roll back. How can I make sure the commands happen atomically?
Share
You’re looking for Transactions unless I’m mistaken.
Here’s a great place to start: http://dev.mysql.com/doc/refman/5.0/en/sql-syntax-transactions.html