Re: [PHP-DB] Re : Problem with PDO exceptions

2009-03-09 Thread Daniel Carrera
Neil Smith [MVP, Digital media] wrote: When you create your DB connection $db, follow the connection line directly after with this : $db-setAttribute(PDO::ATTR_ERRMODE , PDO::ERRMODE_EXCEPTION); The default is I believe PDO::ERRMODE_SILENT which is confusing to most people the first time.

[PHP-DB] Re : Problem with PDO exceptions

2009-03-08 Thread Neil Smith [MVP, Digital media]
Message-ID: 49b2ce8f.1090...@theingots.org Date: Sat, 07 Mar 2009 20:44:15 +0100 From: Daniel Carrera daniel.carr...@theingots.org Hello, I have MySQL 5.1 and PHP 5.2. For some reason PDO is not throwing exceptions when I give it a broken SQL query. For example: try { $stmt =