|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #62503 DDL statements in PDO queries are implicitly commited!
Submitted: 2012-07-07 20:56 UTC Modified: 2012-07-20 06:21 UTC
From: kotai dot kristof at gmail dot com Assigned: aharvey (profile)
Status: Closed Package: PDO related
PHP Version: Irrelevant OS: Win
Private report: No CVE-ID: None
 [2012-07-07 20:56 UTC] kotai dot kristof at gmail dot com
From manual page:

In the manual on this page:

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-08 16:51 UTC]
-Type: Bug +Type: Documentation Problem
 [2012-07-08 21:06 UTC]
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 and propose an better example!
 [2012-07-20 06:20 UTC]
Automatic comment from SVN on behalf of aharvey
Log: Fix doc bug #62503 (DDL statements in PDO queries are implicitly commited!).
 [2012-07-20 06:21 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

 [2012-07-20 06:21 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: aharvey
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Dec 04 02:03:36 2021 UTC