• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/dbresult.php
  • Класс: CAllDBResult
  • Вызов: CAllDBResult::Fetch
function Fetch()
{
	global $DB;

	if ($this->bNavStart || $this->bFromArray)
	{
		if (!is_array($this->arResult))
		{
			$res = false;
		}
		elseif ($res = current($this->arResult))
		{
			next($this->arResult);
		}
	}
	else
	{
		if ($this->SqlTraceIndex)
		{
			$start_time = microtime(true);
		}

		$res = $this->FetchInternal();

		if ($this->SqlTraceIndex)
		{
			/** @noinspection PhpUndefinedVariableInspection */
			$exec_time = round(microtime(true) - $start_time, 10);
			$DB->addDebugTime($this->SqlTraceIndex, $exec_time);
			$DB->timeQuery += $exec_time;
		}
	}

	return $res;
}