I'm looking for some guidance on how to use mysql BEGIN, ROLLBACK and COMMITS. I have situations where i am making 2 or 3 updates to tables in seperate queries and if one fails i want them all rolled back. Can someone help me with the following:
Whats the difference between BEGIN and START TRANSACTION?
How can I best incorporate error handling eg. at present i'm running queries using the following code:
$result = mysql_query($query) OR die('Cannot perform query!'.mysql_error());
On a die statement does mysql look back for a BEGIN or START TRANSACTION and roll back to there or will I have to tell it to ROLLBACK?