Bug #4129 [NEW]: MSSQL fetch array

From: Date: Tue, 12 Apr 2005 19:35:39 +0000
Subject: Bug #4129 [NEW]: MSSQL fetch array
Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-4034@lists.php.net to get a copy of this message
From: davidc at densi dot com Operating system: Debian Testing PHP version: 4.3.10 Package: Bug System Bug Type: Bug Bug description: MSSQL fetch array Description: ------------ This is quite simple. Debian -> TDS -> MSSQL. mssql_fetch_array($result, MSSQL_ASSOC); <- not a possible combo. it returns some fetchAssoc() errors further. but if you put : mssql_fetch_assoc($result); <- everything gets fine and since it was in the if() of a fetchassoc anyways, that's just good manners. Reproduce code: --------------- if ($fetchmode & DB_FETCHMODE_ASSOC) { - $arr = @mssql_fetch_array($result, MSSQL_ASSOC); + $arr = @mssql_fetch_assoc($result); if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && $arr) { $arr = array_change_key_case($arr, CASE_LOWER); } } here's the simple fix. Expected result: ---------------- Everything will be fine then. Actual result: -------------- This outputs errors when using $db->fetchAssoc(); -- Edit bug report at http://pear.php.net/bugs/bug.php?id=4129&edit=1 --

« previous php.pear.webmaster (#4034) next »