note 117365 deleted from pdo.error-handling by salathe
| From: | salathe@php.net | Date: | Mon, 21 Sep 2020 14:59:36 +0000 |
| Subject: | note 117365 deleted from pdo.error-handling by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-215410@lists.php.net to get a copy of this message | ||
Note Submitter: Praveen Raj
----
Setting the PDO::ATTR_ERRMODE to PDO::ERRMODE_EXCEPTION applies to both PDO and PDO::PDOStatement
objects. Also, exceptions are thrown by: PDO::beginTransaction(), PDO::prepare(),
PDOStatement::execute(), PDO::commit(), PDOStatement::fetch(), PDOStatement::fetchAll() and so
on... Some of these are specified in their respective documentations as to return 'false'
in case of an error.