Cita: Verifica que no tengas el AutoCommit en tu MySQL, ya que al hacer el begintransaction, espera una transacción, y al no hacer el commit, aunque no hagas explicitamente el rollback no va a insertar el dato hasta encontrarse con un commit.
Hola, pues mira que $conexion->commiter(); es el que tiene el commit(); y funciona ya que mira que me genera el error:
Cita: PDOException Object ( [message:protected] => SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'sapo' for column 'id_dpto' at row 1 [string:Exception:private] => [code:protected] => HY000 [file:protected] => C:\Zend\Apache2\htdocs\include\cls.trans.DB.php [line:protected] => 97 [trace:Exception:private] => Array ( [0] => Array ( [file] => C:\Zend\Apache2\htdocs\include\cls.trans.DB.php [line] => 97 [function] => execute [class] => PDOStatement [type] => -> [args] => Array ( [0] => Array ( [0] => sapo [1] => Otro [2] => 1 ) ) ) [1] => Array ( [file] => C:\Zend\Apache2\htdocs\borrame1.php [line] => 16 [function] => ejecutar [class] => DB [type] => -> [args] => Array ( [0] => Array ( [0] => sapo [1] => Otro [2] => 1 ) ) ) ) [previous:Exception:private] => [errorInfo] => Array ( [0] => HY000 [1] => 1366 [2] => Incorrect integer value: 'sapo' for column 'id_dpto' at row 1 ) )
Osea que si intenta ejecutar las inserciones y MySql no deja...