Do I need to use the try and catch block to display errors with PHP\'s PDO extension?
For example, with mysql you can usally do something like:
if ( ! $q
You can choose what PDO does with errors via PDO::ATTR_ERRMODE:
$pdo->setAttribute (PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); // Raise E_WARNING.
$pdo->setAttribute (PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); // Sets error codes.
// or
$pdo->setAttribute (PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // throws exception