Fetch Items Created in Last X Time Period

Author Message

Alex Jones

Thursday 04 September 2003 7:13:09 am

Alrighty, another fetch question: How can I fetch all items created within the last 3 months? Is there an easy way to do this via fetch?

Thanks,

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Paul Forsyth

Thursday 04 September 2003 7:21:15 am

The new search method in 3.2 should allow you to do this:

http://ez.no/developer/ez_publish_3/documentation/customization/components/search/search_operator

Paul

Paul Borgermans

Thursday 04 September 2003 7:28:32 am

--oops, Paul F was first ;-)

The docs can be handy:

http://ez.no/developer/ez_publish_3/documentation/customization/components/search/search_operator

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Alex Jones

Thursday 04 September 2003 7:32:03 am

Is there a way to do this in 3.1?

We're on the verge of launching a redesign and I do not want to upgrade the system between now and then (a week from tomorrow).

Thanks for such speedy replies! Two Pauls for the price of one. :)

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Paul Forsyth

Thursday 04 September 2003 7:38:54 am

price, what price? ;) paypal account to follow.

the only other thing i can think of is that you do a tree list of all objects, sort by published date, loop through them with some code logic in place to only show the objects published in the last three months. bit of a sledgehammer solution though :(

Alex Jones

Thursday 04 September 2003 7:40:02 am

I'll buy you both a beer or three if you come visit. ;)

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Paul Forsyth

Thursday 04 September 2003 7:42:07 am

just put an update on my earlier post.

p

Alex Jones

Thursday 04 September 2003 7:50:12 am

In reply to Paul F.'s sledgehammer solution:

I was thinking that might be the only way which isn't as ideal as I would hope for. But as the content wouldn't change too often, I could probably cache the contents so it wouldn't be too hard on the system.

Once this redesign goes live I will need to spend a good bit of time playing with 3.2.

Thanks again,

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

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 18 2025 22:20:47
Script start
Timing: Jan 18 2025 22:20:47
Module start 'layout'
Timing: Jan 18 2025 22:20:47
Module start 'content'
Timing: Jan 18 2025 22:20:47
Module end 'content'
Timing: Jan 18 2025 22:20:47
Script end

Main resources:

Total runtime0.7036 sec
Peak memory usage4,096.0000 KB
Database Queries74

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.0469152.6406
Module start 'layout' 0.00520.0030 740.687539.4766
Module start 'content' 0.00820.6939 780.1641626.6797
Module end 'content' 0.70210.0015 1,406.843816.1250
Script end 0.7036  1,422.9688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4656160.0002
Check MTime0.00140.1983160.0001
Mysql Total
Database connection0.00060.082010.0006
Mysqli_queries0.633590.0378740.0086
Looping result0.00070.0993720.0000
Template Total0.676596.120.3382
Template load0.00210.294020.0010
Template processing0.674495.842320.3372
Template load and register function0.00010.016410.0001
states
state_id_array0.00090.125510.0009
state_identifier_array0.00110.152620.0005
Override
Cache load0.00180.2598400.0000
Sytem overhead
Fetch class attribute can translate value0.00060.090930.0002
Fetch class attribute name0.00480.6882100.0005
XML
Image XML parsing0.00120.169330.0004
class_abstraction
Instantiating content class attribute0.00000.0044130.0000
General
dbfile0.00100.1436230.0000
String conversion0.00000.001740.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
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/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: 23
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs