/** * Returns all table names in the database which start with the tablePrefix. * * @param string $schema * * @return string */ protected function findTableNames($schema = null) { if (!$schema) { $connection = $this->getDbConnection(); $likeSql = $connection->tablePrefix ? ' LIKE \'' . $connection->tablePrefix . '%\'' : ''; return $connection->createCommand()->setText('SHOW TABLES' . $likeSql)->queryColumn(); } else { return parent::findTableNames(); } }
/** * Returns all table names in the database which start with the tablePrefix. * * @access protected * @param string $schema * @return string */ protected function findTableNames($schema = null) { if (!$schema) { $likeSql = craft()->db->tablePrefix ? ' LIKE \'' . craft()->db->tablePrefix . '%\'' : ''; return craft()->db->createCommand()->setText('SHOW TABLES' . $likeSql)->queryColumn(); } else { return parent::findTableNames(); } }