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 15 2025 01:31:10
Script start
Timing: Jan 15 2025 01:31:10
Module start 'layout'
Timing: Jan 15 2025 01:31:10
Module start 'content'
Timing: Jan 15 2025 01:31:11
Module end 'content'
Timing: Jan 15 2025 01:31:11
Script end

Main resources:

Total runtime1.2513 sec
Peak memory usage6,144.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 685.5938183.6875
Module start 'layout' 0.00640.0036 869.281352.5625
Module start 'content' 0.00991.2396 921.84381,655.0078
Module end 'content' 1.24950.0018 2,576.851664.5469
Script end 1.2513  2,641.3984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00690.5547160.0004
Check MTime0.00210.1718160.0001
Mysql Total
Database connection0.00100.076410.0010
Mysqli_queries1.202496.0925460.0261
Looping result0.00040.0322440.0000
Template Total1.209196.620.6045
Template load0.00520.415520.0026
Template processing1.203996.209620.6019
Template load and register function0.00160.128710.0016
states
state_id_array0.00790.632710.0079
state_identifier_array0.00120.095720.0006
Override
Cache load0.00460.370860.0008
Sytem overhead
Fetch class attribute can translate value0.00060.048710.0006
Fetch class attribute name0.00220.175010.0022
XML
Image XML parsing0.00010.008910.0001
class_abstraction
Instantiating content class attribute0.00000.000510.0000
General
dbfile0.00070.0567100.0001
String conversion0.00000.000840.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