collected_info_count_list
Summary
Fetches the number of times different values were collected.Usage
fetch( 'content', 'collected_info_count_list', hash( 'object_attribute_id', object_attribute_id ) )
Parameters
Name | Type | Description | Required |
---|---|---|---|
object_attribute_id | integer | The ID number of the target object attribute. | Yes. |
Returns
An array of integers representing a count for every value.
Description
This function calculates and returns the sum of collected values (integers). It was developed for the poll feature.
Examples
Example 1
{def $counts=fetch( 'content', 'collected_info_count_list', hash( 'object_attribute_id', 1024 ) )} {foreach $counts as $count} {$count} <br /> {/foreach}
Outputs the number of times different values were collected.
Balazs Halasy (06/02/2004 12:05 pm)
Balazs Halasy (29/04/2005 8:27 am)
Comments
hmm...
Friday 18 August 2006 10:06:31 am
Pike
Returns: An array of integers representing a count for every value.
Description: This function calculates and returns the sum of collected values (integers).
Is it me, or are those 3 descriptions all contradicting eachother ? :-)
translations
Monday 19 November 2007 4:43:35 pm
Pike
Depending on how you construct your code, viewing the german object may return only the german results, for example.
$2c,
*pike
Re: translations
Monday 26 October 2009 6:26:26 pm
Vids
I know that $contentobject_attribute_id is difrent for each translation, but please let me know if there is there any other way to get results from all languages without changing the code:
{def $attribute=$contentobject_attribute_item
$contentobject_attribute_id=cond( $attribute|get_class|eq( 'ezinformationcollectionattribute' ),$attribute.contentobject_attribute_id,
$attribute|get_class|eq( 'ezcontentobjectattribute' ),$attribute.id )
$contentobject_attribute=cond( $attribute|get_class|eq( 'ezinformationcollectionattribute' ),$attribute.contentobject_attribute,
$attribute|get_class|eq( 'ezcontentobjectattribute' ),$attribute )
$total_count=fetch( 'content', 'collected_info_count', hash( 'object_attribute_id', $contentobject_attribute_id ) )
$item_counts=fetch( 'content', 'collected_info_count_list', hash( 'object_attribute_id', $contentobject_attribute_id ) )}
Vids