Grouping by an attribute

Author Message

Pablo C. Vergara Castro

Friday 13 August 2004 1:43:39 am

Hi to all.

I would like to know the way to make fetch that single gives back objects to me grouped by a certain attribute. For example, I have several objects of a class publication that have an attribute dates, and what I want it is to know the way to extract the dates that are different and in addition to solely be able to count them.

{... 1999 ...},{... 2000 ...},{... 1999 ...},{... 2001 ...},{... 2000 ...} ===> {1999},{2000},{2001}, (3 attributes)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 13:46:38
Script start
Timing: Jan 19 2025 13:46:38
Module start 'layout'
Timing: Jan 19 2025 13:46:38
Module start 'content'
Timing: Jan 19 2025 13:46:39
Module end 'content'
Timing: Jan 19 2025 13:46:39
Script end

Main resources:

Total runtime1.0868 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 589.1563152.6250
Module start 'layout' 0.00490.0021 741.781339.4453
Module start 'content' 0.00691.0784 781.2266398.4063
Module end 'content' 1.08530.0015 1,179.63288.1641
Script end 1.0868  1,187.7969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2764160.0002
Check MTime0.00120.1107160.0001
Mysql Total
Database connection0.00070.063810.0007
Mysqli_queries1.054096.9808460.0229
Looping result0.00040.0329440.0000
Template Total1.057997.320.5290
Template load0.00200.183020.0010
Template processing1.055997.155820.5280
Template load and register function0.00020.013810.0002
states
state_id_array0.00100.094410.0010
state_identifier_array0.00110.099820.0005
Override
Cache load0.00160.148660.0003
Sytem overhead
Fetch class attribute can translate value0.00050.049910.0005
Fetch class attribute name0.00060.052010.0006
XML
Image XML parsing0.00010.013210.0001
class_abstraction
Instantiating content class attribute0.00000.000410.0000
General
dbfile0.00140.1263100.0001
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 4
 Number of unique templates used: 4

Time used to render debug report: 0.0001 secs