note 81343 added to ref.pdo
| From: | rene dot dettelbacher at gmail dot com | Date: | Sat, 23 Feb 2008 08:48:36 +0000 |
| Subject: | note 81343 added to ref.pdo | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136436@lists.php.net to get a copy of this message | ||
I encountered a strange problem while writing my unit tests for a database abstraction layer using
PDO and transactions:
$statement=$pdo->prepare('SELECT * FROM tablename');
//works
$statement->execute();
$pdo->rollBack();
//error!
$statement->execute();
From my point of view a prepared statement has nothing to do with transactions. Even if I rollback
the statement should stay prepared. I did the same with the older extension for postgres and this
worked!
PHP 5.2.5 (Win)
Postgre SQL 8.1
----
Server IP: 192.35.244.50
Probable Submitter: 212.186.72.130
----
Manual Page -- http://www.php.net/manual/en/ref.pdo.php
Edit -- https://master.php.net/note/edit/81343
Del: integrated -- https://master.php.net/note/delete/81343/integrated
Del: useless -- https://master.php.net/note/delete/81343/useless
Del: bad code -- https://master.php.net/note/delete/81343/bad+code
Del: spam -- https://master.php.net/note/delete/81343/spam
Del: non-english -- https://master.php.net/note/delete/81343/non-english
Del: in docs -- https://master.php.net/note/delete/81343/in+docs
Del: other reasons-- https://master.php.net/note/delete/81343
Reject -- https://master.php.net/note/reject/81343
Search -- https://master.php.net/manage/user-notes.php