CForumMessage::GetList
CDBResult GetList( [array arOrder [, array arFilter [, bool bCount [, int iNum]]]] );
The method GetList returns an optionally filtered and sorted list of messages.
Parameters
Parameter | Description |
---|---|
arOrder |
An array of the format Array(by1=>order1[, by2=>order2 [, ..]]),
where: by - the field by which the list is to be sorted. The following values are possible:
|
arFilter |
An array of the format array("filter field"=>"filter value" [, ...]). The "filter field" can be one of the following:
|
bCount |
If parameter is true, only the number of messages that conforms to the
specified filter is returned. Optional. The default value is false. |
iNum | Maximum number of records returned. If the parameter iNum is not zero, a maximum of iNum records is returned. Not all databases support this feature. If the feature is not supported, this parameter is ignored. Optional. The default value is 0. |
Return Values
Returns an object of the CDBResult class.See Also
Example
<? // select all the published messages of the topic // with the ID of $TID in the message creation order $db_res = CForumMessage::GetList(array("ID"=>"ASC"), array("TOPIC_ID"=>$TID)); while ($ar_res = $db_res->Fetch()) { echo $ar_res["POST_MESSAGE"]."<br>"; } ?>
© «Bitrix24», 2001-2024