I am starting to use TRANSACTIONS in PHP / MySQL but I am observing the following situation:
In my tests I have noticed that rollback is not necessary although I have read that they are always put to return the data to its original state if an error occurs, but my doubt arises from the following example:
1.- deshabilito autocommit.
2.- realizo las querys necesarias.
3.- valido si se realizaron todas la querys.
4.- SI SE realizaron todas lanzar commit (guardar los datos de forma permanente).
5.- SI NO se realizaron todas lanzar rollback (retroceso de datos).
In this situation my question is this:
I understand that when you disable autocommit , nothing will be registered in the database, until you execute a commit . That said I do not see a rollback necessary, since they were never registered in the database.