public function createIndex($indexName, $tableName, $columns)
    {
        
        $sql = 'CREATE INDEX ' . $indexName . ' ON ' . $tableName . ' (';
        $colsSql = array();
        foreach ($columns as $n => $l){
            // $n = name, $l = length
            if (!empty($l)){
                $colsSql[] =  $n . '(' . $l . ')';
            }
            else{
                $colsSql[] =  $n ;
            }
        }
    
        $colsSql = implode(',', $colsSql);
        $sql .= $colsSql . ')';
    
        $this->getDriver()->exec($sql);
        
    }
public function createIndex($indexName, $tableName, $columns)
    {
        
        $sql = 'CREATE INDEX ' . $indexName . ' ON ' . $tableName . ' (';
        $colsSql = array();
        foreach ($columns as $n => $l){
            // $n = name, $l = length
            if (!empty($l)){
                $colsSql[] =  $n . '(' . $l . ')';
            }
            else{
                $colsSql[] =  $n ;
            }
        }
    
        $colsSql = implode(',', $colsSql);
        $sql .= $colsSql . ')';
    
        $this->getDriver()->exec($sql);
        
    }
public function createIndex ( $ indexName , $ tableName , $ columns ) { $ sql = 'CREATE INDEX ' . $ indexName . ' ON ' . $ tableName . ' (' ; $ colsSql = array ( ) ; foreach ( $ columns as $ n => $ l ) { // $n = name, $l = length if ( ! empty ( $ l ) ) { $ colsSql [ ] = $ n . '(' . $ l . ')' ; } else { $ colsSql [ ] = $ n ; } } $ colsSql = implode ( ',' , $ colsSql ) ; $ sql .= $ colsSql . ')' ; $ this -> getDriver ( ) -> exec ( $ sql ) ; }
Short description of method createIndex

@access public
@author Jerome Bogaerts, <jerome@taotesting.com>
@param  string indexName
@param  string tableName
@param  array columns
@return void
Short description of method createIndex