If PDO’s beginTransaction() fails, it returns false. What would be the best thing to do here? Here’s what I’m about to do: If it returns false, I want to log something to a file.
I’m really not sure if array PDO::errorInfo ( void ) is my friend here? Would that contain more information?
You pretty much answered your own question, the only other method to obtain error information in PDO is:
(which is already included in the errorInfo array anyway
It contains all error information available to PDO.
If for whatever reason it returns no error then I’m going to have to go with Alix Axel on this one and guess that it has something to do with transactions not being supported by the current RDBMS