public function get_indexes($table) {
        $indexes = array();
        $sql = 'PRAGMA index_list('.$this->prefix.$table.')';
        if ($this->debug) {
            $this->debug_query($sql);
        }
        $rsindexes = $this->pdb->query($sql);
        foreach($rsindexes as $index) {
            $unique = (boolean)$index['unique'];
            $index = $index['name'];
            $sql = 'PRAGMA index_info("'.$index.'")';
            if ($this->debug) {
                $this->debug_query($sql);
            }
            $rscolumns = $this->pdb->query($sql);
            $columns = array();
            foreach($rscolumns as $row) {
                $columns[] = strtolower($row['name']);
            }
            $index = strtolower($index);
            $indexes[$index]['unique'] = $unique;
            $indexes[$index]['columns'] = $columns;
        }
        return $indexes;
    }
public function get_indexes($table) {
        $indexes = array();
        $sql = 'PRAGMA index_list('.$this->prefix.$table.')';
        if ($this->debug) {
            $this->debug_query($sql);
        }
        $rsindexes = $this->pdb->query($sql);
        foreach($rsindexes as $index) {
            $unique = (boolean)$index['unique'];
            $index = $index['name'];
            $sql = 'PRAGMA index_info("'.$index.'")';
            if ($this->debug) {
                $this->debug_query($sql);
            }
            $rscolumns = $this->pdb->query($sql);
            $columns = array();
            foreach($rscolumns as $row) {
                $columns[] = strtolower($row['name']);
            }
            $index = strtolower($index);
            $indexes[$index]['unique'] = $unique;
            $indexes[$index]['columns'] = $columns;
        }
        return $indexes;
    }
public function get_indexes ( $ table ) { $ indexes = array ( ) ; $ sql = 'PRAGMA index_list(' . $ this -> prefix . $ table . ')' ; if ( $ this -> debug ) { $ this -> debug_query ( $ sql ) ; } $ rsindexes = $ this -> pdb -> query ( $ sql ) ; foreach ( $ rsindexes as $ index ) { $ unique = ( boolean ) $ index [ 'unique' ] ; $ index = $ index [ 'name' ] ; $ sql = 'PRAGMA index_info("' . $ index . '")' ; if ( $ this -> debug ) { $ this -> debug_query ( $ sql ) ; } $ rscolumns = $ this -> pdb -> query ( $ sql ) ; $ columns = array ( ) ; foreach ( $ rscolumns as $ row ) { $ columns [ ] = strtolower ( $ row [ 'name' ] ) ; } $ index = strtolower ( $ index ) ; $ indexes [ $ index ] [ 'unique' ] = $ unique ; $ indexes [ $ index ] [ 'columns' ] = $ columns ; } return $ indexes ; }
Return table indexes - everything lowercased
@param string $table The table we want to get indexes from.
@return array of arrays
Return table indexes - everything lowercased