I'm creating an application using PHP and involving MySQL. If an error is made half way through out a request, how would I "group together queries", check if it would be successful, then do an actual affect to the real table(s). If the actual update to the table(s) fails, then revert to how it was before the update, and give a user error.
I use MySQLi, if that matters.