object_count_by_user_id
Summary
Fetches the number of objects (of a class) created by a user.Usage
fetch( 'content', 'object_count_by_user_id', hash( 'class_id', class_id, 'user_id', user_id ) )
Parameters
Name | Type | Description | Required |
---|---|---|---|
class_id | integer | The ID number of the target class. | Yes. |
user_id | integer | The ID number of the user (object ID). | Yes. |
Returns
The number of objects (as an integer).
Description
This function counts the number of objects (of a certain type) that were created by a user. Both the type of the object (the class) and the user must be specified. The function returns an integer revealing the number of objects that were found.
Examples
{def count=fetch( 'content', 'object_count_by_user_id', hash( 'class_id', 13, 'user_id', 14 ) )} {$count} {undef $count}
Outputs the number of objects (of class number 13) that have been created by user number 14.
Balazs Halasy (06/02/2004 12:10 pm)
Svitlana Shatokhina (05/06/2006 2:49 pm)
Comments
is it possible to fetch object_by_user_id?
Monday 28 November 2005 3:42:34 pm
vytis