mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Remove duplicated code.
Use one centralized functions for data extraction.
This commit is contained in:
parent
560169068d
commit
940e64dba3
3 changed files with 4 additions and 45 deletions
|
@ -1148,18 +1148,7 @@ PHP_FUNCTION(mysqli_fetch_lengths)
|
|||
Get a result row as an enumerated array */
|
||||
PHP_FUNCTION(mysqli_fetch_row)
|
||||
{
|
||||
#if !defined(MYSQLI_USE_MYSQLND)
|
||||
php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MYSQLI_NUM, 0);
|
||||
#else
|
||||
MYSQL_RES *result;
|
||||
zval *mysql_result;
|
||||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_result, mysqli_result_class_entry) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, &mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
|
||||
mysqlnd_fetch_into(result, MYSQLND_FETCH_NUM, return_value, MYSQLND_MYSQLI);
|
||||
#endif
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue