PDO::inTransaction – Checking If Inside a Transaction
The PDO::inTransaction method returns a boolean indicating whether the current database connection is actively inside a transaction, works only with drivers that support transactions, takes no parameters, and returns TRUE on success and FALSE on failure.
