#81 [NEW]: PEAR::DB mssql implementation uses fetch_array where intension is fetch_assoc

From: Date: Thu, 09 Oct 2003 00:01:11 +0000
Subject: #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-22504@lists.php.net to get a copy of this message
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 --

« previous php.pear.dev (#22504) next »