コード例 #1
0
ファイル: MysqlSchema.php プロジェクト: jmstan/craft-website
 /**
  * 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();
     }
 }
コード例 #2
0
 /**
  * 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();
     }
 }