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

	if (strlen($tableName) <= 0)
		return false;

	$dbResult = $this->query("SHOW TABLES LIKE '".$this->getSqlHelper()->forSql($tableName)."'");
	if ($arResult = $dbResult->fetch())
		return true;
	else
		return false;
}