public static function Messaging_Store::get_status in Messaging 6.4
Get status summary
Parameters
$fields: Fields to queue and group by
$conditions: Array of field conditions to restrict the query
Return value
array Array of arrays with the status fields and a 'total' counter for each row
File
- includes/
messaging_store.class.inc, line 264 - Database storage for the messaging framework
Class
- Messaging_Store
- Default storage and queueing system for Messaging
Code
public static function get_status($fields, $conditions = array()) {
$status = array();
$group = $fields;
$fields[] = 'count(*) AS total';
$result = self::select_query($fields, $conditions, array(
'group' => $group,
));
while ($data = db_fetch_array($result)) {
$status[] = $data;
}
return $status;
}