• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/db/dbconnection.php
  • Класс: BitrixMainDBDbConnection
  • Вызов: DbConnection::getIdentity
public function getIdentity($name = "");

public function executeSqlBatch($sqlBatch, $stopOnError = false)
{
	$delimiter = $this->getSqlHelper()->getQueryDelimiter();

	$sqlBatch = trim($sqlBatch);

	$arSqlBatch = array();
	$sql = "";

	do
	{
		if (preg_match("%^(.*?)(['"`#]|--|".$delimiter.")%is", $sqlBatch, $match))
		{
			//Found string start
			if ($match[2] == """ || $match[2] == "'" || $match[2] == "`")
			{
				$sqlBatch = substr($sqlBatch, strlen($match[0]));
				$sql .= $match[0];
				//find a qoute not preceeded by 
				if (preg_match("%^(.*?)(?queryExecute($sql);
		}
		catch (SqlException $ex)
		{
			$result[] = $ex->getMessage();
			if ($stopOnError)
				return $result[0];
		}
	}

	return $result;
}