diff options
author | Brian Moon <brianlmoon@php.net> | 2000-09-20 21:43:57 +0000 |
---|---|---|
committer | Brian Moon <brianlmoon@php.net> | 2000-09-20 21:43:57 +0000 |
commit | 09e00183bdd3a79ed46cb7c2e09c72ccb34582f9 (patch) | |
tree | 64ed7c3f9373e21f30b4bf841d337f81cb925fb6 /ext | |
parent | 7b6d8bfc3cb69ec76268f20442eef5eec43ccad6 (diff) | |
download | php-git-09e00183bdd3a79ed46cb7c2e09c72ccb34582f9.tar.gz |
added mysql_fetch_assoc. Acts like mysql_fetch_array used to.
Diffstat (limited to 'ext')
-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); |