Bug #18473 [Fbk->Bgs]: MDB2_FETCHMODE_ASSOC does not work with mssql driver
| From: | danielc at analysisandsolutions dot com | Date: | Wed, 24 Oct 2012 13:23:42 +0000 |
| Subject: | Bug #18473 [Fbk->Bgs]: MDB2_FETCHMODE_ASSOC does not work with mssql driver | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-9212@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=18473&edit=1
ID: 18473
Updated by: danielc@analysisandsolutions.com
Reported By: aswatts at gmail dot com
Summary: MDB2_FETCHMODE_ASSOC does not work with mssql driver
-Status: Feedback
+Status: Bogus
Type: Bug
Package: MDB2
Operating System: Linux
Package Version: 2.5.0b3
PHP Version: 5.3.1
-Assigned To:
+Assigned To: danielc
Roadmap Versions:
New Comment:
-Status: Feedback
+Status: Bogus
-Assigned To:
+Assigned To: danielc
This has to be user error.
Previous Comments:
------------------------------------------------------------------------
[2011-04-22 01:44:56] doconnor
-Status: Open
+Status: Feedback
------------------------------------------------------------------------
[2011-04-21 22:45:57] quipo
You're missing quotes in your array key:
$tarr['test_var'];
Also, depending on the portability options, the index name might be in a
different
case. Verify the contents of the resultset by doing
print_r($tarr);
------------------------------------------------------------------------
[2011-04-21 22:33:58] a21wat
Description:
------------
When setting the fetchmode:
while ($tarr = $tresult->fetchRow(MDB2_FETCHMODE_ASSOC)){
echo $tarr[test_var];
}
php generates error: PHP Notice: Undefined index: test_var in .....
tried to set fetchmode after connection using:
$db3->setFetchMode(MDB2_FETCHMODE_ASSOC) to no avail.
Only MDB2_FETCHMODE_DEFAULT works
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=18473&edit=1