Doc #62503 [Opn]: DDL statements in PDO queries are implicitly commited!
| From: | johannes@php.net | Date: | Sun, 08 Jul 2012 21:06:13 +0000 |
| Subject: | Doc #62503 [Opn]: DDL statements in PDO queries are implicitly commited! | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-8545@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62503&edit=1
ID: 62503
Updated by: johannes@php.net
Reported by: kotai dot kristof at gmail dot com
Summary: DDL statements in PDO queries are implicitly
commited!
Status: Open
Type: Documentation Problem
Package: PDO related
Operating System: Win
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Note: Some DBMSs allow DDL in transactions. But yes, a better example woud be good. btw. if you want
that to happen faster: go to https://edit.php.net/?project=PHP&perm=en/pdo.commit.php
and propose an better example!
Previous Comments:
------------------------------------------------------------------------
[2012-07-07 20:56:51] kotai dot kristof at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/pdo.commit#refsect1-pdo.commit-examples
---
In the manual on this page: http://www.php.net/manual/en/pdo.commit.php
In the first example, the code is very misleading. Because DDL statements in PDO
queries are always implicitly commited! So the commit() call after the exec() call
makes no difference.
Instead use an INSERT, UPDATE or DELETE query pls.
Test script:
---------------
not required
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62503&edit=1