Re: #81 [NEW]: PEAR::DB mssql implementation uses fetch_array where intension is fetch_assoc
| From: | Gunther Richter | Date: | Wed, 15 Oct 2003 02:04:14 +0000 |
| Subject: | Re: #81 [NEW]: PEAR::DB mssql implementation uses fetch_array where intension is fetch_assoc | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-22698@lists.php.net to get a copy of this message | ||
Had that same problem in January ... was fixed with DB/mssql.php version
1.6.
http://cvs.php.net/cvs.php/pear/DB/DB/mssql.php
"Jcalixto At Activevoice Dot Com" <pear-dev@lists.php.net> wrote in message
news:<bug-81@pear.php.net>...
> From: jcalixto at activevoice dot com
> Operating system: all
> PHP version: Irrelevant
> PHP Bug Type:
> Bug description: PEAR::DB mssql implementation uses fetch_array where
intension is fetch_assoc
>
> Description:
> ------------
> Found while trying to access a ms sql server using tiki wiki's dsn
> feature.
>
> The result set that mssql.php returns when called like this:
>
> $result->fetchRow(DB_FETCHMODE_ASSOC);
>
> is not an associative array but a plain array.
>
>
>
> Reproduce code:
> ---------------
> The fetchInto function currently does:
>
> if ($fetchmode & DB_FETCHMODE_ASSOC) {
> $ar = @mssql_fetch_array($result);
>
> when it should do this:
>
> if ($fetchmode & DB_FETCHMODE_ASSOC) {
> $ar = @mssql_fetch_assoc($result);
>
> Expected result:
> ----------------
> only 1 set of columns per result with the headers being the names of the
> columns
>
> Actual result:
> --------------
> duplicate columns -> the first set has the column index as the header, the
> second set has the actual column name as the header
>
> --
> Edit bug report at
> http://pear.php.net/bugs/bug.php?id=81&edit=1
> --