summaryrefslogtreecommitdiff
path: root/ext/pdo/pdo_dbh.c
diff options
context:
space:
mode:
authorGeorge Schlossnagle <gschlossnagle@php.net>2004-05-18 15:19:31 +0000
committerGeorge Schlossnagle <gschlossnagle@php.net>2004-05-18 15:19:31 +0000
commita97e1a66466a6a59a6bf1d1ede4a2493822080fb (patch)
tree85e69b2ac3fede9c6dfa065c354b9a7d8f9910ff /ext/pdo/pdo_dbh.c
parent3e0cbfb07797d11d005ddb8a40c1b5d018adad7c (diff)
downloadphp-git-a97e1a66466a6a59a6bf1d1ede4a2493822080fb.tar.gz
handle binding/quoting of queries for drivers with emulated prepares
Diffstat (limited to 'ext/pdo/pdo_dbh.c')
-rwxr-xr-xext/pdo/pdo_dbh.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index 2529506390..c05a5f847e 100755
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -133,7 +133,9 @@ static PHP_METHOD(PDO, prepare)
}
stmt = ecalloc(1, sizeof(*stmt));
-
+ /* uncoditionally keep this for later reference */
+ stmt->query_string = estrndup(statement, statement_len);
+ stmt->query_stringlen = statement_len;
if (dbh->methods->preparer(dbh, statement, statement_len, stmt TSRMLS_CC)) {
/* prepared; create a statement object for PHP land to access it */
Z_TYPE_P(return_value) = IS_OBJECT;
@@ -146,9 +148,7 @@ static PHP_METHOD(PDO, prepare)
stmt->dbh = dbh;
return;
}
-
efree(stmt);
-
RETURN_FALSE;
}