Re: cvs: php4 /ext/mysql php_mysql.c php_mysql.h
| From: | Zeev Suraski | Date: | Thu, 21 Sep 2000 04:43:40 +0000 |
| Subject: | Re: cvs: php4 /ext/mysql php_mysql.c php_mysql.h | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-1821@lists.php.net to get a copy of this message | ||
Can you explain this patch..?
At 00:43 21/09/2000, brianlmoon wrote:
-- Zeev Suraski <zeev@zend.com> http://www.zend.com/brianlmoon Wed Sep 20 14:43:58 2000 EDTModified files:/php4/ext/mysql php_mysql.h php_mysql.cLog: added mysql_fetch_assoc. Acts like mysql_fetch_array used to. Index: php4/ext/mysql/php_mysql.h diff -u php4/ext/mysql/php_mysql.h:1.14 php4/ext/mysql/php_mysql.h:1.15--- php4/ext/mysql/php_mysql.h:1.14 Sun Jul 2 16:46:43 2000+++ php4/ext/mysql/php_mysql.h Wed Sep 20 14:43:57 2000 @@ -17,7 +17,7 @@ */ -/* $Id: php_mysql.h,v 1.14 2000/07/02 23:46:43 sas Exp $ */ +/* $Id: php_mysql.h,v 1.15 2000/09/20 21:43:57 brianlmoon Exp $ */ #ifndef PHP_MYSQL_H #define PHP_MYSQL_H @@ -63,6 +63,7 @@ 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); Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.51 php4/ext/mysql/php_mysql.c:1.52--- php4/ext/mysql/php_mysql.c:1.51 Wed Jul 5 13:41:06 2000+++ php4/ext/mysql/php_mysql.c Wed Sep 20 14:43:57 2000 @@ -16,7 +16,7 @@+----------------------------------------------------------------------+*/ -/* $Id: php_mysql.c,v 1.51 2000/07/05 20:41:06 zeev Exp $ */ +/* $Id: php_mysql.c,v 1.52 2000/09/20 21:43:57 brianlmoon Exp $ */ /* TODO: @@ -108,6 +108,7 @@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,13 +1353,21 @@ /* {{{ 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);} /* }}} */ + +/* {{{ 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 CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net