• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/db/mysqlcommonconnection.php
  • Класс: BitrixMainDBMysqlCommonConnection
  • Вызов: MysqlCommonConnection::getTableFields
public function getTableFields($tableName)
{
	if (!isset($this->tableColumnsCache[$tableName]))
	{
		$this->connectInternal();

		$sqlTableName = ($tableName[0] === '(')
			? $tableName.' AS xyz' // subquery
			: $this->getSqlHelper()->quote($tableName); // regular table name

		$query = $this->queryInternal("SELECT * FROM {$sqlTableName} LIMIT 0");

		$result = $this->createResult($query);

		$this->tableColumnsCache[$tableName] = $result->getFields();
	}
	return $this->tableColumnsCache[$tableName];
}