• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/db/mysqlcommonconnection.php
  • Класс: BitrixMainDBMysqlCommonConnection
  • Вызов: MysqlCommonConnection::isTableExists
public function isTableExists($tableName)
{
	$tableName = preg_replace("/[^a-z0-9%_]+/i", "", $tableName);
	$tableName = trim($tableName);

	if ($tableName == '')
	{
		return false;
	}

	$result = $this->query("SHOW TABLES LIKE '".$this->getSqlHelper()->forSql($tableName)."'");

	return (bool) $result->fetch();
}