I am sorry, setting |PDO::ATTR_ERRMODE| attribute to
|PDO::ERRMODE_EXCEPTION| *does* throw an Exception when the table cannot be
found. Stupid me; I was trying to catch Exception rather than a
PDOException.
On Sun, Mar 8, 2009 at 6:03 PM, kesavan trichy rengarajan wrote:
> yup, I have set the |
yup, I have set the |PDO::ATTR_ERRMODE| attribute to
|PDO::ERRMODE_EXCEPTION|
and I am still not getting an exception!
My Code is something like this:
$query = $db->prepare($sql);
$query->execute($bind);
$row = $query->fetch(PDO::FETCH_ASSOC);
wher $db is the PDO obj and
Hi,
Did you set the value of the |PDO::ATTR_ERRMODE| attribute to
|PDO::ERRMODE_EXCEPTION|?
Btw, I don't think ||prepare would throw an exception even for a
malformed query, but ||execute definitely should.
Regards,
Z
I think it is a bug. I have seen this happening at work (PDO not
throwing exception when executing a query on a non existing table)
News on iPhone: http://trk7.com/mob
On 08/03/2009, at 6:44 AM, Daniel Carrera
wrote:
Hello,
I have MySQL 5.1 and PHP 5.2. For some reason PDO is not throwi