Forums / Setup & design / Sort on number of downloads?

Sort on number of downloads?

Author Message

Daniel Guerrier

Wednesday 03 August 2005 6:29:12 pm

I have a content class with a file attribute.
I wanted to sort a fetch of of the objects on the number of times the file was downloaded. The doc says that sort doesn't support the file attribute, but I was hoping that there was a way to sort on the download number.

Thx

Daniel Guerrier

Thursday 04 August 2005 6:29:13 am

This has to be something that someone wanted to do in the past. What would be the point of keeping track of download if you can't do anything with it. Has anyone figured how to sort on #of downloads of a file that is an attribute of a content object?

Daniel Guerrier

Thursday 04 August 2005 2:10:03 pm

anyone?

David Eriksson

Friday 05 August 2005 12:35:05 am

The only way I can think of is to sort it yourself, either using your own template operator, or writing it in template language.

/David

eZ debug

Timing: Jan 19 2025 03:27:43
Script start
Timing: Jan 19 2025 03:27:43
Module start 'content'
Timing: Jan 19 2025 03:27:44
Module end 'content'
Timing: Jan 19 2025 03:27:44
Script end

Main resources:

Total runtime1.0272 sec
Peak memory usage4,096.0000 KB
Database Queries61

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 588.9531180.8359
Module start 'content' 0.00721.0080 769.7891507.2813
Module end 'content' 1.01520.0120 1,277.070342.1094
Script end 1.0271  1,319.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2909140.0002
Check MTime0.00130.1264140.0001
Mysql Total
Database connection0.00090.092010.0009
Mysqli_queries0.978595.2541610.0160
Looping result0.00070.0726590.0000
Template Total0.974694.920.4873
Template load0.00230.221420.0011
Template processing0.972394.649420.4861
Template load and register function0.00020.023410.0002
states
state_id_array0.00180.171610.0018
state_identifier_array0.00380.366920.0019
Override
Cache load0.00180.1770120.0002
Sytem overhead
Fetch class attribute can translate value0.00070.066520.0003
Fetch class attribute name0.00180.176440.0005
XML
Image XML parsing0.00020.019220.0001
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00530.5118120.0004
String conversion0.00000.000630.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs