diff options
author | Wez Furlong <wez@php.net> | 2005-02-07 01:16:16 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2005-02-07 01:16:16 +0000 |
commit | 501000f129c159be440e1ba80ac794980ab40a2f (patch) | |
tree | 18613ccdd3b438e95007aaf38605e99ffbbd42af | |
parent | 36e3ea8cb240b1a4c58988c0e4ea47d827f180cf (diff) | |
download | php-git-501000f129c159be440e1ba80ac794980ab40a2f.tar.gz |
Implement input/output parameters
-rwxr-xr-x | ext/pdo_odbc/odbc_stmt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c index b726dd2ed4..7de4ad51b1 100755 --- a/ext/pdo_odbc/odbc_stmt.c +++ b/ext/pdo_odbc/odbc_stmt.c @@ -119,7 +119,7 @@ static int odbc_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *p case PDO_PARAM_EVT_ALLOC: /* figure out what we're doing */ - switch (param->param_type) { + switch (PDO_PARAM_TYPE(param->param_type)) { case PDO_PARAM_LOB: case PDO_PARAM_STMT: return 0; @@ -136,7 +136,10 @@ static int odbc_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *p ctype = SQL_C_CHAR; } rc = SQLBindParameter(S->stmt, param->paramno+1, - param->max_value_len <= 0 ? SQL_PARAM_INPUT : SQL_PARAM_OUTPUT, + ((param->param_type & PDO_PARAM_INPUT_OUTPUT) == PDO_PARAM_INPUT_OUTPUT) ? + SQL_PARAM_INPUT_OUTPUT : + param->max_value_len <= 0 ? + SQL_PARAM_INPUT : SQL_PARAM_OUTPUT, ctype, sqltype, precision, scale, Z_STRVAL_P(param->parameter), param->max_value_len <= 0 ? 0 : param->max_value_len, |