summaryrefslogtreecommitdiff
path: root/ext/pdo/pdo_dbh.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo/pdo_dbh.c')
-rwxr-xr-xext/pdo/pdo_dbh.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index 88c4d43b1d..3a4fbe3e00 100755
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -406,6 +406,7 @@ static PHP_METHOD(PDO, prepare)
stmt->query_string = estrndup(statement, statement_len);
stmt->query_stringlen = statement_len;
stmt->default_fetch_type = PDO_FETCH_BOTH;
+ stmt->dbh = dbh;
if (dbh->methods->preparer(dbh, statement, statement_len, stmt, driver_options TSRMLS_CC)) {
/* prepared; create a statement object for PHP land to access it */