当前位置: 首页>>代码示例>>PHP>>正文


PHP PMA_Util::getTableList方法代码示例

本文整理汇总了PHP中PMA_Util::getTableList方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_Util::getTableList方法的具体用法?PHP PMA_Util::getTableList怎么用?PHP PMA_Util::getTableList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PMA_Util的用法示例。


在下文中一共展示了PMA_Util::getTableList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unset

        if ($style == 'even') {
            $style = 'odd';
        } else {
            $style = 'even';
        }
    }
    unset($tmp_link);
    ?>
    </tbody>
    </table>
    </div>
    <?php 
}
$sep = $GLOBALS['cfg']['NavigationTreeTableSeparator'];
// Get list of tables
$table_list = PMA_Util::getTableList($GLOBALS['db']);
$my_tables = array();
// For each table try to get the tracking version
foreach ($table_list as $key => $value) {
    // If $value is a table group.
    if (array_key_exists('is' . $sep . 'group', $value) && $value['is' . $sep . 'group']) {
        foreach ($value as $temp_table) {
            // If $temp_table is a table with the value for 'Name' is set,
            // rather than a property of the table group.
            if (is_array($temp_table) && array_key_exists('Name', $temp_table)) {
                $tracking_version = PMA_Tracker::getVersion($GLOBALS['db'], $temp_table['Name']);
                if ($tracking_version == -1) {
                    $my_tables[] = $temp_table['Name'];
                }
            }
        }
开发者ID:Sorekk,项目名称:cvillecouncilus,代码行数:31,代码来源:db_tracking.php

示例2: PMA_getUntrackedTables

/**
 * Get untracked tables
 *
 * @param string $db current database
 *
 * @return array $untracked_tables
 */
function PMA_getUntrackedTables($db)
{
    $untracked_tables = array();
    $sep = $GLOBALS['cfg']['NavigationTreeTableSeparator'];
    // Get list of tables
    $table_list = PMA_Util::getTableList($db);
    // For each table try to get the tracking version
    foreach ($table_list as $key => $value) {
        // If $value is a table group.
        if (array_key_exists('is' . $sep . 'group', $value) && $value['is' . $sep . 'group']) {
            foreach ($value as $temp_table) {
                // If $temp_table is a table with the value for 'Name' is set,
                // rather than a property of the table group.
                if (is_array($temp_table) && array_key_exists('Name', $temp_table)) {
                    $tracking_version = PMA_Tracker::getVersion($db, $temp_table['Name']);
                    if ($tracking_version == -1) {
                        $untracked_tables[] = $temp_table['Name'];
                    }
                }
            }
        } else {
            // If $value is a table.
            if (PMA_Tracker::getVersion($db, $value['Name']) == -1) {
                $untracked_tables[] = $value['Name'];
            }
        }
    }
    return $untracked_tables;
}
开发者ID:plabong,项目名称:phpmyadmin,代码行数:36,代码来源:tracking.lib.php

示例3: PMA_displayDbList


//.........这里部分代码省略.........
                    printf($img_minus, $element_counter);
                }
                echo '</a>';

                // ... and we need to refresh both frames on db selection
                ?>
                <a class="item"
                    id="<?php echo htmlspecialchars($db['name']); ?>"
                    href="index.php?<?php echo $common_url_query; ?>"
                    target="_parent"
                    title="<?php echo htmlspecialchars($db['comment']); ?>"
                    onclick="
                        if (! toggle('<?php echo $element_counter; ?>', true))
                            window.parent.goTo('navigation.php?<?php echo $common_url_query; ?>');
                        window.parent.goTo('<?php echo $GLOBALS['cfg']['DefaultTabDatabase']
                            . '?' . $common_url_query; ?>', 'main');
                        return false;">
                    <?php
                    // Might be unset if CountTables directive is false
                    if (isset($db['num_tables'])) {
                        if ($GLOBALS['text_dir'] === 'rtl') {
                            echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
                        }
                    }
                    echo htmlspecialchars($db['disp_name']);
                    if (isset($db['num_tables'])) {
                        if ($GLOBALS['text_dir'] === 'ltr') {
                            echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
                        }
                    }
                    ?>
                </a>
                <?php
            } else {
                // with only 1 db available we dont need to refresh navi frame
                // on db selection, only phpmain
                ?>
                <a href="<?php echo $GLOBALS['cfg']['DefaultTabDatabase']
                    . '?' . $common_url_query; ?>"
                    id="<?php echo htmlspecialchars($db['name']); ?>"
                    title="<?php echo htmlspecialchars($db['comment']); ?>">
                    <?php
                    if (isset($db['num_tables'])) {
                        if ($GLOBALS['text_dir'] === 'rtl') {
                            echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
                        }
                    }
                    echo htmlspecialchars($db['disp_name']);
                    if (isset($db['num_tables'])) {
                        if ($GLOBALS['text_dir'] === 'ltr') {
                            echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
                        }
                    }
                    ?>
                </a>
                <?php
            }
            if (($GLOBALS['cfg']['Server']['CountTables'] === false)
                || $db['num_tables']
            ) {
                if (isset($tables_full[$db['name']])) {
                    $tables = PMA_Util::getTableList(
                        $db['name'],
                        $tables_full[$db['name']]
                    );
                } elseif (isset($tables_full[strtolower($db['name'])])) {
                    // on windows with lower_case_table_names = 1
                    // MySQL returns
                    // with SHOW DATABASES or information_schema.SCHEMATA: `Test`
                    // but information_schema.TABLES gives `test`
                    // bug #1436171
                    // sf.net/tracker/?func=detail&aid=1436171&group_id=23067&atid=377408
                    $tables = PMA_Util::getTableList(
                        $db['name'],
                        $tables_full[strtolower($db['name'])]
                    );
                } else {
                    $tables = PMA_Util::getTableList($db['name']);
                }
                $child_visible
                    = (bool) (count($GLOBALS['pma']->databases) === 1 || $db_start == $db['name']);
                PMA_displayTableList($tables, $child_visible, '', $db['name']);
            } elseif ($GLOBALS['cfg']['LeftFrameLight']) {
                // no tables and LeftFrameLight:
                // display message no tables in selected db
                echo '<p>' . __('Please select a database') . '</p>' . "\n";
            }
            echo '</li>' . "\n";
        } // end foreach db
    } // end foreach group

    if ($close_db_group) {
        $url_dbgroup = '';
        echo '</ul>';
        echo '</li>';
        $close_db_group = false;
    }

    echo '</ul>' . "\n";
}
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:101,代码来源:navigation.php

示例4: PMA_generate_common_url

<?php

/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * DB search optimisation
 *
 * @package PhpMyAdmin
 */
require_once 'libraries/common.inc.php';
require_once 'libraries/Util.class.php';
$db = $_GET['db'];
$table_term = $_GET['table'];
$common_url_query = PMA_generate_common_url($GLOBALS['db']);
$tables_full = PMA_Util::getTableList($db);
$tables_response = array();
foreach ($tables_full as $key => $table) {
    if (strpos($key, $table_term) !== false) {
        $link = '<li class="ajax_table"><a class="tableicon" title="' . htmlspecialchars($link_title) . ': ' . htmlspecialchars($table['Comment']) . ' (' . PMA_Util::formatNumber($table['Rows'], 0) . ' ' . __('Rows') . ')"' . ' id="quick_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"' . ' href="' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '?' . $common_url_query . '&amp;table=' . urlencode($table['Name']) . '&amp;goto=' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '" >';
        $attr = array('id' => 'icon_' . htmlspecialchars($table_db . '.' . $table['Name']));
        if (PMA_Table::isView($table_db, $table['Name'])) {
            $link .= PMA_Util::getImage('s_views.png', htmlspecialchars($link_title), $attr);
        } else {
            $link .= PMA_Util::getImage('b_browse.png', htmlspecialchars($link_title), $attr);
        }
        $link .= '</a>';
        // link for the table name itself
        $href = $GLOBALS['cfg']['DefaultTabTable'] . '?' . $common_url_query . '&amp;table=' . urlencode($table['Name']) . '&amp;pos=0';
        $link .= '<a href="' . $href . '" title="' . htmlspecialchars(PMA_Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']) . ': ' . $table['Comment'] . ' (' . PMA_Util::formatNumber($table['Rows'], 0) . ' ' . __('Rows') . ')') . '" id="' . htmlspecialchars($table_db . '.' . $table['Name']) . '">' . str_replace(' ', '&nbsp;', htmlspecialchars($table['disp_name'])) . '</a>';
        $link .= '</li>' . "\n";
        $table['line'] = $link;
        $tables_response[] = $table;
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:31,代码来源:db_tables_search.php


注:本文中的PMA_Util::getTableList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。