Bug #17875 Updated: sizeof() reports double the elements for an mssql_fetch_array
| From: | sander@php.net | Date: | Thu, 20 Jun 2002 16:07:41 +0000 |
| Subject: | Bug #17875 Updated: sizeof() reports double the elements for an mssql_fetch_array | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-11576@lists.php.net to get a copy of this message | ||
ID: 17875
Updated by: sander@php.net
Reported By: cusaacb@squared.com
-Status: Open
+Status: Bogus
Bug Type: Arrays related
Operating System: Linux
PHP Version: 4.2.1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
"mssql_fetch_array() is an extended version of mssql_fetch_row(). In
addition to storing the data in the numeric indices of the result
array, it also stores the data in associative indices, using the field
names as keys."
Previous Comments:
------------------------------------------------------------------------
[2002-06-20 11:56:14] cusaacb@squared.com
// correct behavior
$arr = array();
$arr[0] = "One";
$arr[1] = "Two";
$arr[2] = "Three";
print "Normal:   ";
print sizeof($arr) . "<BR><BR>";
//show bug
$rs = mssql_query("select '1' as one, '2' as two, '3' as three
from
tablename");
$sqlarr = mssql_fetch_array($rs);
print
"Bug:         ";
//----- HERES THE BUG
print sizeof($sqlarr) . "\n";
./configure --prefix=/usr/local/php --with-sybase=/usr/local/freetds
--with-pgsql=/usr/local/pgsql --with-apxs2=/usr/local/apache2/bin/apxs
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17875&edit=1