From 15e754201fd7fc3400efc1b4f1aca6204317fecc Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 5 Feb 2005 21:29:42 +0000 Subject: [PATCH] pass param type to quoter functions --- ext/pdo/pdo_sql_parser.re | 3 ++- ext/pdo/pdo_stmt.c | 2 +- ext/pdo/php_pdo_driver.h | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re index b779f168e8..09c81ffe92 100644 --- a/ext/pdo/pdo_sql_parser.re +++ b/ext/pdo/pdo_sql_parser.re @@ -160,7 +160,8 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len, } if (stmt->dbh->methods->quoter) { if (!stmt->dbh->methods->quoter(stmt->dbh, Z_STRVAL_P(param->parameter), - Z_STRLEN_P(param->parameter), &plc->quoted, &plc->qlen TSRMLS_CC)) { + Z_STRLEN_P(param->parameter), &plc->quoted, &plc->qlen, + param->param_type TSRMLS_CC)) { /* bork */ ret = -1; strcpy(stmt->error_code, stmt->dbh->error_code); diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index b0ae3f7301..4aec036fb9 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -680,7 +680,7 @@ static PHP_METHOD(PDOStatement, rowCount) } /* }}} */ -/* {{{ proto int PDOStatement::errorCode() +/* {{{ proto string PDOStatement::errorCode() Fetch the error code associated with the last operation on the statement handle */ static PHP_METHOD(PDOStatement, errorCode) { diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h index 422b108098..b054611328 100755 --- a/ext/pdo/php_pdo_driver.h +++ b/ext/pdo/php_pdo_driver.h @@ -35,7 +35,7 @@ struct pdo_bound_param_data; # define FALSE 0 #endif -#define PDO_DRIVER_API 20050120 +#define PDO_DRIVER_API 20050205 enum pdo_param_type { PDO_PARAM_NULL, @@ -195,7 +195,7 @@ typedef int (*pdo_dbh_prepare_func)(pdo_dbh_t *dbh, const char *sql, long sql_le typedef long (*pdo_dbh_do_func)(pdo_dbh_t *dbh, const char *sql, long sql_len TSRMLS_DC); /* quote a string */ -typedef int (*pdo_dbh_quote_func)(pdo_dbh_t *dbh, const char *unquoted, int unquotedlen, char **quoted, int *quotedlen TSRMLS_DC); +typedef int (*pdo_dbh_quote_func)(pdo_dbh_t *dbh, const char *unquoted, int unquotedlen, char **quoted, int *quotedlen, enum pdo_param_type paramtype TSRMLS_DC); /* transaction related */ typedef int (*pdo_dbh_txn_func)(pdo_dbh_t *dbh TSRMLS_DC); -- 2.50.1