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

Bug #7213 PDO->fetchAll() Params in queryAll()
Submitted: 2006-03-27 08:39 UTC
From: marc dot jakubowski at gmail dot com Assigned: lsmith
Status: Closed Package: LiveUser_Admin (version 0.3.7)
PHP Version: 5.1.1 OS: XP
Roadmaps: (Not assigned)    
Subscription  


 [2006-03-27 08:39 UTC] marc dot jakubowski at gmail dot com (Marc Jakubowski)
Description: ------------ When using PDO as storage and calling the get*() methods without parameters or with array('select' => 'all') to fetch all Groups, Rights etc the method queryAll() in Admin/Storage/PDO.php is called and $stmt->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_COLUMN|PDO::FETCH_GROUP); is executed but it will only return the first columns as a numeric array instead of all columns in an associated array. When removing the "|PDO::FETCH_COLUMN|PDO::FETCH_GROUP" part so that only PDO::FETCH_ASSOC is used, everything works fine. Test script: --------------- $admin->perm->getGroups(); Expected result: ---------------- array(2) { [0] => array(3) { ["group_id"] => string(1) "1" ["group_type"] => string(1) "1" ["group_define_name"] => string(4) "Member" } [1] => array(3) { ["group_id"] => string(1) "2" ["group_type"] => string(1) "1" ["group_define_name"] => string(4) "Admin" } } Actual result: -------------- array(2) { [1] => array(1) { [0] => string(1) "1" } [2] => array(1) { [0] => string(1) "1" } }

Comments

 [2006-03-27 09:33 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!