FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=18473&edit=1

ID: 18473
Updated by: danielc@analysisandsolutions.com
Reported By: aswatts@gmail.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

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedOct 24, '12 at 1:23p
activeOct 24, '12 at 1:23p
posts1
users1
websitepear.php.net

1 user in discussion

Danielc: 1 post

People

Translate

site design / logo © 2022 Grokbase