You are here

public static function Messaging_Store::get_messages in Messaging 6.4

Retrieve from messaging database storage

Parameters

$params: Array of field value pairs

$order: Optional array of field names to order by

$limit: Optional maximum number of rows to retrieve

$pager: Optional pager element for pager queries

$full: Wehther to fully unpack the message and load related objects

File

includes/messaging_store.class.inc, line 216
Database storage for the messaging framework

Class

Messaging_Store
Default storage and queueing system for Messaging

Code

public static function get_messages($params, $order = NULL, $limit = NULL, $pager = NULL, $full = TRUE) {
  $messages = array();
  $result = self::select_query('*', $params, array(
    'limit' => $limit,
    'order' => $order,
    'pager' => $pager,
  ));
  while ($msg = db_fetch_object($result)) {
    $messages[$msg->mqid] = self::message_unpack($msg, $full);
  }
  return $messages;
}