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

Request #8353 A group by column would be very useful
Submitted: 2006-08-03 16:47 UTC
From: pear at simonellistonball dot com Assigned:
Status: Wont fix Package: Structures_DataGrid (version 0.7.1)
PHP Version: Irrelevant OS: n/a
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 47 + 1 = ?

 
 [2006-08-03 16:47 UTC] pear at simonellistonball dot com (simon elliston ball)
Description: ------------ A nice additional feature would be to add a means to groups by a column. For example: -------------------------- | group | record entries | |------------------------| | head1 | record entry1 | | head1 | record entry2 | | head2 | record entry3 | | head2 | record entry4 | | head2 | record entry5 | -------------------------- to: -------------------------- | group | record entries | |------------------------| | head1 | | record entry1 | | record entry2 | | head2 | | record entry3 | | record entry4 | | record entry5 | -------------------------- Acheived by something like $datagrid->groupBy('group');

Comments

 [2006-08-03 17:08 UTC] olivierg at php dot net (Olivier Guilyardi)
This sort of feature is already partly addressed in bug #4565. However I think such "record grouping" is a rather bad idea. What you are asking for is a "Data Tree" not a "Data Grid". The former is based on _hierarchical_ data sources, while a DataGrid is based on _tabular_ data sources. This is conceptually different. Your groupBy() method looks nice and simple. However, I believe it is likely to bloat Structures_DataGrid and its drivers with endless complexity. We could discuss this some more, however I believe a whole new Structures_DataTree package would be a better place to do what you want.
 [2006-08-04 10:11 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!
 [2006-08-04 22:01 UTC] olivierg at php dot net (Olivier Guilyardi)
Okay, we won't fix this. Thanks for your report anyway.