diff options
Diffstat (limited to 'ext/pdo_firebird/firebird_statement.c')
-rw-r--r-- | ext/pdo_firebird/firebird_statement.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c index 6d42f22110..f28ffa0a59 100644 --- a/ext/pdo_firebird/firebird_statement.c +++ b/ext/pdo_firebird/firebird_statement.c @@ -1,4 +1,4 @@ -/* +/* +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ @@ -229,6 +229,9 @@ static int firebird_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */ #endif col->param_type = PDO_PARAM_INT; break; + case SQL_BOOLEAN: + col->param_type = PDO_PARAM_BOOL; + break; default: col->param_type = PDO_PARAM_STR; break; @@ -416,6 +419,11 @@ static int firebird_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, /* {{ *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); *len = slprintf(*ptr, CHAR_BUF_LEN, "%F" , *(double*)var->sqldata); break; + case SQL_BOOLEAN: + *len = sizeof(zend_bool); + *ptr = FETCH_BUF(S->fetch_buf[colno], zend_bool, 1, NULL); + *(zend_bool*)*ptr = *(FB_BOOLEAN*)var->sqldata; + break; case SQL_TYPE_DATE: isc_decode_sql_date((ISC_DATE*)var->sqldata, &t); fmt = S->H->date_format ? S->H->date_format : PDO_FB_DEF_DATE_FMT; |