CForumMessage::GetListEx
CDBResult GetListEx( [array arOrder [, array arFilter [, bool bCount [, int iNum]]]] );
The method GetListEx returns a filtered and sorted list of messages including all bound data.
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 reverse message creation order $db_res = CForumMessage::GetListEx(array("ID"=>"DESC"), array("TOPIC_ID"=>$TID)); while ($ar_res = $db_res->Fetch()) { echo "<pre>"; print_r($ar_res); echo "</pre><br>"; } ?>
© «Bitrix24», 2001-2024