F
F
Franco Mannino2017-02-04 17:21:52
API
Franco Mannino, 2017-02-04 17:21:52

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

2 answer(s)
R
Roman Gritsuk, 2017-02-04
@garinov

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.

A
Alexey Burlaka, 2017-02-04
@AlexeyGfi

"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 question

Ask a Question

731 491 924 answers to any question