php - Multiple commands atomically -


i'm using php , mysql call couple of commands. there group-employee cross-reference table, , employees may added or removed group. i'm writing feature first removing employees , adding in each employee in table if group modified. want make sure commands go through or else have table roll back. how can make sure commands happen atomically?

you're looking transactions unless i'm mistaken.

here's great place start: http://dev.mysql.com/doc/refman/5.0/en/sql-syntax-transactions.html


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -