mirror of
https://github.com/php/php-src.git
synced 2024-12-01 13:54:10 +08:00
Added missing constant and correct bound column retrieval. When bound
columns are specified only return status (TRUE/FALSE) indicator.
This commit is contained in:
parent
ddb32b11b2
commit
905fbfd85e
@ -215,6 +215,7 @@ PHP_MINIT_FUNCTION(pdo)
|
||||
REGISTER_LONG_CONSTANT("PDO_FETCH_NUM", (long)PDO_FETCH_NUM, CONST_CS|CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("PDO_FETCH_BOTH", (long)PDO_FETCH_BOTH, CONST_CS|CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("PDO_FETCH_OBJ", (long)PDO_FETCH_OBJ, CONST_CS|CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("PDO_FETCH_BOUND",(long)PDO_FETCH_BOUND, CONST_CS|CONST_PERSISTENT);
|
||||
|
||||
REGISTER_LONG_CONSTANT("PDO_ATTR_AUTOCOMMIT", (long)PDO_ATTR_AUTOCOMMIT, CONST_CS|CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("PDO_ATTR_SCROLL", (long)PDO_ATTR_SCROLL, CONST_CS|CONST_PERSISTENT);
|
||||
|
@ -440,6 +440,11 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, enum pdo_
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (how == PDO_FETCH_BOUND) {
|
||||
RETVAL_TRUE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (return_value) {
|
||||
int i;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user