View Single Post
  #1 (permalink)  
Old 06-13-2007, 01:08 AM
santouras santouras is offline
Junior Member
 
Join Date: Jun 2007
Location: perth, australia
Posts: 10
Default Reporting SQL Errors with Zend_Db

Hi guys,

Hopefully this isn't a really silly question... But I'm confused as to how to get Zend_Db to report on SQL errors. I know I can use the profiler, but when my application throws an error I would love to see "SQL Error... incorrect syntax...." etc etc. Do I need to use a try/catch block around every piece of SQL?

In an semi related question, the profiler returns the SQL query in its unbound state, with ":variables" in place instead of their substituted values. Is this how PDO works or is there a way to see the variables that I've substituted in there.
Reply With Quote