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


PHP PMA_extract_indexes函数代码示例

本文整理汇总了PHP中PMA_extract_indexes函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_extract_indexes函数的具体用法?PHP PMA_extract_indexes怎么用?PHP PMA_extract_indexes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: PMA_displayTable

        }
        if (!isset($dontlimitchars)) {
            $dontlimitchars = 0;
        }
        // hide edit and delete links for information_schema
        if (PMA_MYSQL_INT_VERSION >= 50002 && isset($db) && $db == 'information_schema') {
            $disp_mode = 'nnnn110111';
        }
        PMA_displayTable($result, $disp_mode, $analyzed_sql);
        PMA_DBI_free_result($result);
        // BEGIN INDEX CHECK See if indexes should be checked.
        if (isset($query_type) && $query_type == 'check_tbl' && isset($selected) && is_array($selected)) {
            foreach ($selected as $idx => $tbl_name) {
                $indexes = $indexes_info = $indexes_data = array();
                $tbl_ret_keys = PMA_get_indexes(urldecode($tbl_name), $err_url_0);
                PMA_extract_indexes($tbl_ret_keys, $indexes, $indexes_info, $indexes_data);
                $idx_collection = PMA_show_indexes(urldecode($tbl_name), $indexes, $indexes_info, $indexes_data, false);
                $check = PMA_check_indexes($idx_collection);
                if (!empty($check)) {
                    ?>
<table border="0" cellpadding="2" cellspacing="0">
    <tr>
        <td class="tblHeaders" colspan="7"><?php 
                    printf($strIndexWarningTable, urldecode($tbl_name));
                    ?>
</td>
    </tr>
    <?php 
                    echo $check;
                    ?>
</table>
开发者ID:robmat,项目名称:samplebator,代码行数:31,代码来源:sql.php

示例2: get_all_keys

function get_all_keys()
{
    global $db;
    require_once './libs/tbl_indexes.lib.php';
    PMA_DBI_select_db($db);
    $tables_all_keys = array();
    for ($I = 0; $I < sizeof($GLOBALS['PMD']['TABLE_NAME_SMALL']); $I++) {
        $ret_keys = PMA_get_indexes($GLOBALS['PMD']['TABLE_NAME_SMALL'][$I]);
        if (!empty($ret_keys)) {
            // reset those as the function uses them by reference
            $indexes = $indexes_info = $indexes_data = array();
            PMA_extract_indexes($ret_keys, $indexes, $indexes_info, $indexes_data);
            // for now, take into account only the first index segment
            foreach ($indexes_data as $one_index) {
                $column_name = $one_index[1]['Column_name'];
                $tables_all_keys[$GLOBALS['PMD']['OWNER'][$I] . '.' . $GLOBALS['PMD']['TABLE_NAME_SMALL'][$I] . '.' . $column_name] = 1;
            }
        }
    }
    return $tables_all_keys;
}
开发者ID:BGCX261,项目名称:zhe-project-agri-hg-to-git,代码行数:21,代码来源:pmd_common.php


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