Doctrine\DBAL\Platforms\MySqlPlatform::getListTableIndexesSQL PHP Method

getListTableIndexesSQL() public method

Two approaches to listing the table indexes. The information_schema is preferred, because it doesn't cause problems with SQL keywords such as "order" or "table".
public getListTableIndexesSQL ( $table, $currentDatabase = null )
    public function getListTableIndexesSQL($table, $currentDatabase = null)
    {
        if ($currentDatabase) {
            $currentDatabase = $this->quoteStringLiteral($currentDatabase);
            $table = $this->quoteStringLiteral($table);
            return "SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, " . "SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, " . "CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, " . "NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment " . "FROM information_schema.STATISTICS WHERE TABLE_NAME = " . $table . " AND TABLE_SCHEMA = " . $currentDatabase;
        }
        return 'SHOW INDEX FROM ' . $table;
    }
MySqlPlatform