problem with filtering by date

Author Message

Lida Popelo

Saturday 09 October 2004 9:02:42 am

Hi All,

I have a class "some_class" with attribute "begin_date" of type date.
In template i want to fetch instances of SomeClass where "begin_date" >= today date, so i
wrote:

{let items = fetch(content, 
                   list,
                   hash(parent_node_id, 64,
                        attribute_filter, array(
                                                array(some_class/begin_date, 
                                                      '>='
                                                      currentdate())))}

But it dosen't work right :(
Please help me...

Gunnstein Lye

Monday 11 October 2004 5:04:07 am

Instead of writing some_class/begin_date, you should use the attribute id of that attribute (you can see it when you view the class).

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 31 2025 06:24:26
Script start
Timing: Jan 31 2025 06:24:26
Module start 'layout'
Timing: Jan 31 2025 06:24:26
Module start 'content'
Timing: Jan 31 2025 06:24:27
Module end 'content'
Timing: Jan 31 2025 06:24:27
Script end

Main resources:

Total runtime1.0676 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 588.1328151.2109
Module start 'layout' 0.00750.0042 739.343836.6641
Module start 'content' 0.01171.0550 776.0078917.1563
Module end 'content' 1.06670.0009 1,693.16417.8516
Script end 1.0676  1,701.0156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3061160.0002
Check MTime0.00130.1237160.0001
Mysql Total
Database connection0.00060.060610.0006
Mysqli_queries1.022395.7566540.0189
Looping result0.00050.0439520.0000
Template Total1.022295.720.5111
Template load0.00200.183120.0010
Template processing1.020295.559220.5101
Template load and register function0.00120.114510.0012
states
state_id_array0.00220.204910.0022
state_identifier_array0.00190.176020.0009
Override
Cache load0.00160.1502130.0001
Sytem overhead
Fetch class attribute can translate value0.00040.040320.0002
Fetch class attribute name0.00190.179530.0006
XML
Image XML parsing0.00060.055220.0003
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00230.2186160.0001
String conversion0.00000.000940.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs