framework/db/QueryBuilder.php
public function createIndex($name, $table, $columns, $unique = false)
    {
        return ($unique ? 'CREATE UNIQUE INDEX ' : 'CREATE INDEX ')
            . $this->db->quoteTableName($name) . ' ON '
            . $this->db->quoteTableName($table)
            . ' (' . $this->buildColumns($columns) . ')';
    }
public function createIndex($name, $table, $columns, $unique = false)
    {
        return ($unique ? 'CREATE UNIQUE INDEX ' : 'CREATE INDEX ')
            . $this->db->quoteTableName($name) . ' ON '
            . $this->db->quoteTableName($table)
            . ' (' . $this->buildColumns($columns) . ')';
    }
public function createIndex ( $ name , $ table , $ columns , $ unique = false ) { return ( $ unique ? 'CREATE UNIQUE INDEX ' : 'CREATE INDEX ' ) . $ this -> db -> quoteTableName ( $ name ) . ' ON ' . $ this -> db -> quoteTableName ( $ table ) . ' (' . $ this -> buildColumns ( $ columns ) . ')' ; }
Builds a SQL statement for creating a new index.
@param string $name the name of the index. The name will be properly quoted by the method.
@param string $table the table that the new index will be created for. The table name will be properly quoted by the method.
@param string|array $columns the column(s) that should be included in the index. If there are multiple columns,
separate them with commas or use an array to represent them. Each column name will be properly quoted
by the method, unless a parenthesis is found in the name.
@param bool $unique whether to add UNIQUE constraint on the created index.
@return string the SQL statement for creating a new index.
Builds a SQL statement for creating a new index .