Bitrix Site Manager


The CDBResult class represents the result of a database query.

The class contains methods that can be used to implement the pagewise navigation and handle the query results. An instance of this class is created automatically and returned by the method CDatabase::Query.


Property Description
resultResult description.
arResult Array describing the result (only valid upon calling NavStart).
NavRecordCount Number of records (only valid upon calling NavStart).
NavPageCount Number of pages (only valid upon calling NavStart).
NavPageNomer Number of the current page in the pagewise navigation sequence (only valid upon calling NavStart)
NavPageSize Size of a page (only valid upon calling NavStart).
bFirstPrintNav True if the method CDBResult::NavPrint had been called once (only valid upon calling NavStart).
bShowAll Specifies (true / false) the link All is to be displayed in the pagewise navigation screen (only valid upon calling NavStart).
NavShowAll True if the current screen displays all records as opposed to pagewise display (i.e. a user clicked the link All) (only valid upon calling NavStart).
NavNum Current page ordinal used with the pagewise navigation mode (only valid upon calling NavStart).
nStartPage True if the first page is currently displayed (only valid upon calling NavStart).
nEndPage True if the last page is currently displayed (only valid upon calling NavStart).


Method Description
Fetch Retrieves the fields and stores them in an array.
NavNext Returns an array of field values.
NavPrint Used to display the pagewise navigation links.
NavStart Splits the result of the selection into pages.
NavStringForCache Returns the string which uniquely identify the current state of pagewise navigation.
IsNavPrint Determines if all records may fit in a single page.
GetNext Returns an array of field values converted to the HTML safe format.
ExtractFields Defines global variables by the field names.
FieldName Returns the name of a field by its ordinal.
FieldsCount Returns the number of fields in the selection.
SelectedRowsCount Returns the number of records selected with SELECT.
AffectedRowsCount Returns a number of records modified by executing such SQL commands as INSERT, UPDATE or DELETE.
InitFromArray Initializes the instance of CDBResult with the supplied values.