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 <k...@trk7.com>wrote: > 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 $sql is the sql query and $bind is the bound > parameter > > > On Sun, Mar 8, 2009 at 5:35 PM, Zoltan Ormandi < > ormandi.zol...@webfunteam.hu> wrote: > > 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 > > > > > >