note 78532 added to ref.pdo

From: Date: Tue, 16 Oct 2007 15:34:21 +0000
Subject: note 78532 added to ref.pdo
Groups: php.notes 
Request: Send a blank email to php-notes+get-131427@lists.php.net to get a copy of this message
Example 5: <?php try { $dbh = new PDO('odbc:SAMPLE', 'db2inst1', 'ibmdb2', array(PDO::ATTR_PERSISTENT => true)); ....... } catch (Exception $e) { $dbh->rollBack(); echo "Failed: " . $e->getMessage(); } ?> We must change the last two lines to catch the error connecting to the database: } catch (Exception $e) { echo "Failed: " . $e->getMessage(); $dbh->rollBack(); } ?> ---- Server IP: 194.145.210.3 Probable Submitter: 82.142.137.242 ---- Manual Page -- http://www.php.net/manual/en/ref.pdo.php Edit -- https://master.php.net/note/edit/78532 Del: integrated -- https://master.php.net/note/delete/78532/integrated Del: useless -- https://master.php.net/note/delete/78532/useless Del: bad code -- https://master.php.net/note/delete/78532/bad+code Del: spam -- https://master.php.net/note/delete/78532/spam Del: non-english -- https://master.php.net/note/delete/78532/non-english Del: in docs -- https://master.php.net/note/delete/78532/in+docs Del: other reasons-- https://master.php.net/note/delete/78532 Reject -- https://master.php.net/note/reject/78532 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#131427) next »