I am working with PDO in PHP.
Now I wonder if you could catch any global error and show.
With global I mean if any $sql=$connect->prepare()
fails, then echo out
"Something went wrong:" . the_error
Or would you need to always do it invidually each $sql ?
You can do it using
PDO::errorInfo()
http://www.php.net/manual/en/pdo.errorinfo.php
That's about as global as youre going to get.
You could always catch exceptions thrown by the PDO class.