Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.0b5

Bug #18473 MDB2_FETCHMODE_ASSOC does not work with mssql driver
Submitted: 2011-04-22 02:33 UTC
From: a21wat Assigned: danielc
Status: Bogus Package: MDB2 (version 2.5.0b3)
PHP Version: 5.3.1 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2011-04-22 02:33 UTC] a21wat (Andre Watts)
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

Comments

 [2011-04-22 02:45 UTC] quipo (Lorenzo Alberton)
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-22 05:44 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Feedback
 [2012-10-24 18:23 UTC] danielc (Daniel Convissor)
-Status: Feedback +Status: Bogus -Assigned To: +Assigned To: danielc
This has to be user error.