irm-1.6-b3/MDB/Modules/Manager/fbsql.php
/**
     * list all indexes in a table
     *
     * @param object    $dbs        database object that is extended by this class
     * @param string    $table      name of table that should be used in method
     * @return mixed data array on success, a MDB error on failure
     * @access public
     */
list all indexes in a table
@param object    $dbs        database object that is extended by this class
@param string    $table      name of table that should be used in method
@return mixed data array on success, a MDB error on failure
@access public
list all indexes in a table @param object $dbs database object that is extended by this class @param string $table name of table that should be used in method @return mixed data array on success a MDB error on failure @access public
function listTableIndexes(&$db, $table)
    {
        if(MDB::isError($result = $db->query("SHOW INDEX FROM $table"))) {
            return($result);
        }
        $indexes_all = $db->fetchCol($result, 'Key_name');
        for($found = $indexes = array(), $index = 0, $indexes_all_cnt = count($indexes_all);
            $index < $indexes_all_cnt;
            $index++)
        {
            if ($indexes_all[$index] != 'PRIMARY'
                && !isset($found[$indexes_all[$index]]))
            {
                $indexes[] = $indexes_all[$index];
                $found[$indexes_all[$index]] = 1;
            }
        }
        return($indexes);
    }
function listTableIndexes ( & $ db , $ table ) { if ( MDB :: isError ( $ result = $ db -> query ( " SHOW INDEX FROM  $ table " ) ) ) { return ( $ result ) ; } $ indexes_all = $ db -> fetchCol ( $ result , 'Key_name' ) ; for ( $ found = $ indexes = array ( ) , $ index = 0 , $ indexes_all_cnt = count ( $ indexes_all ) ; $ index < $ indexes_all_cnt ; $ index ++ ) { if ( $ indexes_all [ $ index ] != 'PRIMARY' && ! isset ( $ found [ $ indexes_all [ $ index ] ] ) ) { $ indexes [ ] = $ indexes_all [ $ index ] ; $ found [ $ indexes_all [ $ index ] ] = 1 ; } } return ( $ indexes ) ; }
list all indexes in a table
 @param object    $dbs        database object that is extended by this class
 @param string    $table      name of table that should be used in method
 @return mixed data array on success, a MDB error on failure
 @access public
list all indexes in a table @param object $dbs database object that is extended by this class @param string $table name of table that should be used in method @return mixed data array on success a MDB error on failure @access public