diff options
-rw-r--r-- | ext/mysql/php_mysql.c | 11 | ||||
-rw-r--r-- | ext/mysql/php_mysql.h | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index ac87d54226..c77cdd2a9e 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -108,6 +108,7 @@ function_entry mysql_functions[] = { PHP_FE(mysql_num_fields, NULL) PHP_FE(mysql_fetch_row, NULL) PHP_FE(mysql_fetch_array, NULL) + PHP_FE(mysql_fetch_assoc, NULL) PHP_FE(mysql_fetch_object, NULL) PHP_FE(mysql_data_seek, NULL) PHP_FE(mysql_fetch_lengths, NULL) @@ -1352,7 +1353,7 @@ PHP_FUNCTION(mysql_fetch_object) /* {{{ proto array mysql_fetch_array(int result [, int result_type]) - Fetch a result row as an associative array */ + Fetch a result row as an array (associative, numeric or both)*/ PHP_FUNCTION(mysql_fetch_array) { php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); @@ -1360,6 +1361,14 @@ PHP_FUNCTION(mysql_fetch_array) /* }}} */ +/* {{{ proto array mysql_fetch_assoc(int result) + Fetch a result row as an associative array */ +PHP_FUNCTION(mysql_fetch_assoc) +{ + php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MYSQL_ASSOC); +} +/* }}} */ + /* {{{ proto int mysql_data_seek(int result, int row_number) Move internal result pointer */ PHP_FUNCTION(mysql_data_seek) diff --git a/ext/mysql/php_mysql.h b/ext/mysql/php_mysql.h index be3a88b25b..21de02e71d 100644 --- a/ext/mysql/php_mysql.h +++ b/ext/mysql/php_mysql.h @@ -63,6 +63,7 @@ PHP_FUNCTION(mysql_num_rows); PHP_FUNCTION(mysql_num_fields); PHP_FUNCTION(mysql_fetch_row); PHP_FUNCTION(mysql_fetch_array); +PHP_FUNCTION(mysql_fetch_assoc); PHP_FUNCTION(mysql_fetch_object); PHP_FUNCTION(mysql_data_seek); PHP_FUNCTION(mysql_fetch_lengths); |