How to fetch collected info list?

Author Message

Petter Arneson

Tuesday 09 August 2005 6:56:41 am

I have a simple newsletter subscribe form, and the email adresses entered are collected. I want to loop the content of the ezinfocollection database table to extract <b>all</b> the adresses that are entered for my newsletter. I want to do this dynamic, but the documentation states that the collection_id is required. There must be a way to do this without looping from id 1. (in case your collection starts at f.ex. 120)

Something like this:

{let collection=fetch('content','collected_info_collection',
  hash('object_attribute_id',272,'object_id',67))}

 {section loop=$collection}
  {foreach $collection.attributes}
   {$attribute.contentclass_attribute_name}<br />
   .. send email stuff... 
  {/foreach}
 {/section}

{/let}

I guess I could start from id nr 1 and check on content before proceeding if there's no workaround. Is it possible to write my own sql query in the templates?

- Thanks

www.vzt.no

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 04:33:44
Script start
Timing: Jan 19 2025 04:33:44
Module start 'layout'
Timing: Jan 19 2025 04:33:44
Module start 'content'
Timing: Jan 19 2025 04:33:46
Module end 'content'
Timing: Jan 19 2025 04:33:46
Script end

Main resources:

Total runtime1.3820 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.0071 590.6250152.6250
Module start 'layout' 0.00710.0029 743.250039.4453
Module start 'content' 0.01001.3708 782.6953429.4063
Module end 'content' 1.38080.0012 1,212.10168.1563
Script end 1.3820  1,220.2578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.3010160.0003
Check MTime0.00150.1056160.0001
Mysql Total
Database connection0.00180.131210.0018
Mysqli_queries1.343097.1770460.0292
Looping result0.00050.0344440.0000
Template Total1.345797.420.6728
Template load0.00230.165520.0011
Template processing1.343497.202820.6717
Template load and register function0.00030.025010.0003
states
state_id_array0.00120.084310.0012
state_identifier_array0.00150.106320.0007
Override
Cache load0.00180.133580.0002
Sytem overhead
Fetch class attribute can translate value0.00070.053510.0007
Fetch class attribute name0.00060.044310.0006
XML
Image XML parsing0.00020.017910.0002
class_abstraction
Instantiating content class attribute0.00000.000310.0000
General
dbfile0.00070.0511100.0001
String conversion0.00000.000640.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
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 6
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs