Answer the question
In order to leave comments, you need to log in
Bitrix and offset (in a database query)?
For example, there is a query to the database,
$run = mysql_query("SELECT * FROM images ORDER BY id DESC LIMIT ".$postnumbers." OFFSET ".$offset);
But how to do it through the Bitrix API, for example, through CIBlockElement::GetList ()?
For LIMIT ".$postnumbers. I see an analogue in arNavStartParams - Array("nPageSize"=>$postnumbers),
but what about OFFSET?
Answer the question
In order to leave comments, you need to log in
CIBlockElement::GetList - documentation on the function, everything is there.
If you need to get the fields of infoblock elements (without properties), you can use getList of the new core .
ElementTable - a class for working with a table of infoblock elements.
"iNumPage" — page number for page navigation.
If the page size is 20 elements and the "current page number" when querying == 2, then the fetch starts at 41 records.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question