• Модуль: biconnector
  • Путь к файлу: ~/bitrix/modules/biconnector/lib/db/mysqliconnection.php
  • Класс: BitrixBIConnectorDBMysqliConnection
  • Вызов: MysqliConnection::queryInternal
protected function queryInternal($sql, array $binds = null, DiagSqlTrackerQuery $trackerQuery = null)
{
	$this->connectInternal();

	if ($trackerQuery !== null)
	{
		$trackerQuery->startQuery($sql, $binds);
	}

	if ($this->biMode)
	{
		$result = $this->resource->prepare($sql);
	}
	else
	{
		$result = $this->resource->query($sql, MYSQLI_STORE_RESULT);
	}

	if ($trackerQuery !== null)
	{
		$trackerQuery->finishQuery();
	}

	$this->lastQueryResult = $result;

	if (!$result)
	{
		throw new SqlQueryException('Mysql query error', $this->getErrorMessage(), $sql);
	}

	return $result;
}