Bitrix Site Manager

CDBResult::FieldsCount

int
CDBResult::FieldsCount()

The method FieldsCount returns the number of fields in the selection.

Parameters

No parameters.

Return Values

Number of fields in the selection.

See Also

Example



<?
$rs = $DB->Query($query,true);
$intNumFields = $rs->FieldsCount();
$i = 0;
while ($i<$intNumFields) 
{
	$arFieldName[] = $rs->FieldName($i);
	$i++;
}
?>