Documentation

CForumPrivateMessage::GetList

CDBResult
GetList(
 [array arOrder [,
 array arFilter [,
 bool bCount ]]]
);

The GetList method returns a selection of messages filtered by arFilter and sorted in the arOrder order.

Parameters

ParameterDescription
arOrder An array of the format Array(by1=>order1[, by2=>order2 [, ..]]), where:
  • by - filter field, can have the following values:
    • ID - the message ID;
    • AUTHOR_ID - the message author ID;
    • POST_DATE - the date when the message was created;
    • POST_SUBJ - the message subject;
    • POST_MESSAGE - the message body;
    • USER_ID - the recipient user ID;
    • FOLDER_ID - the folder ID;
    • IS_READ - marks the message is read;
    • USE_SMILES - indicates whether smileys can be used;
    • AUTHOR_NAME - the message author name;
  • order - sort order, can have the following values:
    • ASC - ascending;
    • DESC - descending.
Optional. The default value is Array("ID"=>"ASC").
arFilter An array in the format array("filtered field"=>"filter value" [, ...]). The following values are possible:
  • ID - the message ID;
  • AUTHOR_ID - the message author ID;
  • POST_SUBJ - the message subject;
  • POST_MESSAGE - the message body;
  • USER_ID - the recipient user ID;
  • FOLDER_ID - the folder ID;
  • IS_READ - marks the message is read.

The following logic can be specified at the beginning of the field name:

  • "!" - not equal;
  • "<" - less than;
  • "<=" - less or equal;
  • ">" - more than;
  • ">=" - more or equal.

Required.

bCount If set to true, the method returns a number of records matching the filter. Optional. False by default.

Return Values

The method returns an instance of the CDBResult object.

See Also

CDBResult
Private message table

  • © «Bitrix24», 2001-2024
    Up