diff options
| author | George Schlossnagle <gschlossnagle@php.net> | 2004-05-18 15:19:31 +0000 |
|---|---|---|
| committer | George Schlossnagle <gschlossnagle@php.net> | 2004-05-18 15:19:31 +0000 |
| commit | a97e1a66466a6a59a6bf1d1ede4a2493822080fb (patch) | |
| tree | 85e69b2ac3fede9c6dfa065c354b9a7d8f9910ff /ext/pdo/pdo_dbh.c | |
| parent | 3e0cbfb07797d11d005ddb8a40c1b5d018adad7c (diff) | |
| download | php-git-a97e1a66466a6a59a6bf1d1ede4a2493822080fb.tar.gz | |
handle binding/quoting of queries for drivers with emulated prepares
Diffstat (limited to 'ext/pdo/pdo_dbh.c')
| -rwxr-xr-x | ext/pdo/pdo_dbh.c | 6 |
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; } |
