mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
pass param type to quoter functions
This commit is contained in:
parent
95cc208464
commit
15e754201f
3 changed files with 5 additions and 4 deletions
|
@ -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) {
|
||||||
if (!stmt->dbh->methods->quoter(stmt->dbh, Z_STRVAL_P(param->parameter),
|
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 */
|
/* bork */
|
||||||
ret = -1;
|
ret = -1;
|
||||||
strcpy(stmt->error_code, stmt->dbh->error_code);
|
strcpy(stmt->error_code, stmt->dbh->error_code);
|
||||||
|
|
|
@ -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 */
|
Fetch the error code associated with the last operation on the statement handle */
|
||||||
static PHP_METHOD(PDOStatement, errorCode)
|
static PHP_METHOD(PDOStatement, errorCode)
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,7 @@ struct pdo_bound_param_data;
|
||||||
# define FALSE 0
|
# define FALSE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PDO_DRIVER_API 20050120
|
#define PDO_DRIVER_API 20050205
|
||||||
|
|
||||||
enum pdo_param_type {
|
enum pdo_param_type {
|
||||||
PDO_PARAM_NULL,
|
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);
|
typedef long (*pdo_dbh_do_func)(pdo_dbh_t *dbh, const char *sql, long sql_len TSRMLS_DC);
|
||||||
|
|
||||||
/* quote a string */
|
/* 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 */
|
/* transaction related */
|
||||||
typedef int (*pdo_dbh_txn_func)(pdo_dbh_t *dbh TSRMLS_DC);
|
typedef int (*pdo_dbh_txn_func)(pdo_dbh_t *dbh TSRMLS_DC);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue