]> granicus.if.org Git - php/commitdiff
pass param type to quoter functions
authorWez Furlong <wez@php.net>
Sat, 5 Feb 2005 21:29:42 +0000 (21:29 +0000)
committerWez Furlong <wez@php.net>
Sat, 5 Feb 2005 21:29:42 +0000 (21:29 +0000)
ext/pdo/pdo_sql_parser.re
ext/pdo/pdo_stmt.c
ext/pdo/php_pdo_driver.h

index b779f168e8ae0e2e849b3c13652f192cde399409..09c81ffe926ab5bd537bc0adaa6e1e5da7a20f45 100644 (file)
@@ -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);
index b0ae3f7301c0b486ee5fdc8bb845cae7e2629d09..4aec036fb90d2e1ef115a42675df26cdc9b2263d 100755 (executable)
@@ -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)
 {
index 422b108098792e72bcb5201c1b3e97d77b825d63..b0546113283248c2339073ddcdf04d54edc23b2b 100755 (executable)
@@ -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);