cvs: php4 /ext/mssql php_mssql.c php_mssql.h
| From: | Harald Radi | Date: | Sun, 02 Dec 2001 21:10:16 +0000 |
| Subject: | cvs: php4 /ext/mssql php_mssql.c php_mssql.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-8393@lists.php.net to get a copy of this message | ||
phanto Sun Dec 2 16:10:16 2001 EDT
Modified files:
/php4/ext/mssql php_mssql.c php_mssql.h
Log:
added mssql_fetch_assoc() to be more mysql conform
changed mssql_fetch_array() back to its default behaviour (MSSQL_BOTH)
Index: php4/ext/mssql/php_mssql.c
diff -u php4/ext/mssql/php_mssql.c:1.72 php4/ext/mssql/php_mssql.c:1.73
--- php4/ext/mssql/php_mssql.c:1.72 Mon Oct 29 18:41:15 2001
+++ php4/ext/mssql/php_mssql.c Sun Dec 2 16:10:15 2001
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mssql.c,v 1.72 2001/10/29 23:41:15 fmk Exp $ */
+/* $Id: php_mssql.c,v 1.73 2001/12/02 21:10:15 phanto Exp $ */
#ifdef COMPILE_DL_MSSQL
#define HAVE_MSSQL 1
@@ -63,6 +63,7 @@
PHP_FE(mssql_fetch_field, NULL)
PHP_FE(mssql_fetch_row, NULL)
PHP_FE(mssql_fetch_array, NULL)
+ PHP_FE(mssql_fetch_assoc, NULL)
PHP_FE(mssql_fetch_object, NULL)
PHP_FE(mssql_field_length, NULL)
PHP_FE(mssql_field_name, NULL)
@@ -1280,11 +1281,19 @@
Returns an associative array of the current row in the result set specified by result_id */
PHP_FUNCTION(mssql_fetch_array)
{
- php_mssql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MSSQL_ASSOC);
+ php_mssql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MSSQL_BOTH);
}
/* }}} */
+/* {{{ proto array mssql_fetch_array(int result_id [, int result_type])
+ Returns an associative array of the current row in the result set specified by result_id */
+PHP_FUNCTION(mssql_fetch_assoc)
+{
+ php_mssql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MSSQL_ASSOC);
+}
+
+/* }}} */
/* {{{ proto int mssql_data_seek(int result_id, int offset)
Moves the internal row pointer of the MS-SQL result associated with the specified result
identifier to pointer to the specified row number */
Index: php4/ext/mssql/php_mssql.h
diff -u php4/ext/mssql/php_mssql.h:1.17 php4/ext/mssql/php_mssql.h:1.18
--- php4/ext/mssql/php_mssql.h:1.17 Tue Oct 23 12:34:52 2001
+++ php4/ext/mssql/php_mssql.h Sun Dec 2 16:10:15 2001
@@ -17,7 +17,7 @@
*/
-/* $Id: php_mssql.h,v 1.17 2001/10/23 16:34:52 fmk Exp $ */
+/* $Id: php_mssql.h,v 1.18 2001/12/02 21:10:15 phanto Exp $ */
#ifndef PHP_MSSQL_H
#define PHP_MSSQL_H
@@ -70,6 +70,7 @@
PHP_FUNCTION(mssql_fetch_field);
PHP_FUNCTION(mssql_fetch_row);
PHP_FUNCTION(mssql_fetch_array);
+PHP_FUNCTION(mssql_fetch_assoc);
PHP_FUNCTION(mssql_fetch_object);
PHP_FUNCTION(mssql_field_length);
PHP_FUNCTION(mssql_field_name);