From 09e00183bdd3a79ed46cb7c2e09c72ccb34582f9 Mon Sep 17 00:00:00 2001 From: Brian Moon Date: Wed, 20 Sep 2000 21:43:57 +0000 Subject: added mysql_fetch_assoc. Acts like mysql_fetch_array used to. --- ext/mysql/php_mysql.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ext/mysql/php_mysql.c') 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) -- cgit v1.2.1