List Info

Thread: note 78532 added to ref.pdo




note 78532 added to ref.pdo
user name
2007-10-16 10:34:21
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.p
hp.net/manual/en/ref.pdo.php
Edit        -- https://master
.php.net/note/edit/78532
Del: integrated  -- h
ttps://master.php.net/note/delete/78532/integrated
Del: useless     -- http
s://master.php.net/note/delete/78532/useless
Del: bad code    -- htt
ps://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     -- http
s://master.php.net/note/delete/78532/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/78532
Reject      -- https://mast
er.php.net/note/reject/78532
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )