Does the method PDOStatement::fetch() throw an exception on failure, if the PDO error reporting system is set to throw exceptions? E.g. if I set:
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
Do you know such a case?
Thank you very much.
UPDATE:
The method PdoStatement::fetch
throws indeed exceptions on failure, instead of FALSE
. Such a case is demonstrated in my answer:
In conclusion:
PDOStatement::fetch
returnsFALSE
if no records are found.PDOStatement::fetch
throws exceptions on failure.