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


PHP PMA_centralColumnsGetParams函数代码示例

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


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

示例1: PMA_getCentralColumnsListRaw

/**
 * get the list of columns in given database excluding
 * the columns present in current table
 *
 * @param string $db    selected database
 * @param string $table current table name
 *
 * @return string encoded list of columns present in central list for the given
 *                database
 */
function PMA_getCentralColumnsListRaw($db, $table)
{
    $cfgCentralColumns = PMA_centralColumnsGetParams();
    if (empty($cfgCentralColumns)) {
        return json_encode(array());
    }
    $centralTable = $cfgCentralColumns['table'];
    if (empty($table) || $table == '') {
        $query = 'SELECT * FROM ' . Util::backquote($centralTable) . ' ' . 'WHERE db_name = \'' . $db . '\';';
    } else {
        $GLOBALS['dbi']->selectDb($db, $GLOBALS['userlink']);
        $columns = (array) $GLOBALS['dbi']->getColumnNames($db, $table, $GLOBALS['userlink']);
        $cols = '';
        foreach ($columns as $col_select) {
            $cols .= '\'' . Util::sqlAddSlashes($col_select) . '\',';
        }
        $cols = trim($cols, ',');
        $query = 'SELECT * FROM ' . Util::backquote($centralTable) . ' ' . 'WHERE db_name = \'' . $db . '\'';
        if ($cols) {
            $query .= ' AND col_name NOT IN (' . $cols . ')';
        }
        $query .= ';';
    }
    $GLOBALS['dbi']->selectDb($cfgCentralColumns['db'], $GLOBALS['controllink']);
    $columns_list = (array) $GLOBALS['dbi']->fetchResult($query, null, null, $GLOBALS['controllink']);
    PMA_handleColumnExtra($columns_list);
    return json_encode($columns_list);
}
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:38,代码来源:central_columns.lib.php

示例2: testPMACentralColumnsGetParams

 /**
  * Test for PMA_centralColumnsGetParams
  *
  * @return void
  */
 public function testPMACentralColumnsGetParams()
 {
     $this->assertSame(array('user' => 'pma_user', 'db' => 'phpmyadmin', 'table' => 'pma_central_columns'), PMA_centralColumnsGetParams());
 }
开发者ID:nobodypb,项目名称:phpmyadmin,代码行数:9,代码来源:PMA_central_columns_test.php

示例3: PMA_getCentralColumnsListRaw

    echo PMA_getCentralColumnsListRaw($db, $_POST['cur_table']);
    exit;
}
if (isset($_POST['add_column'])) {
    $selected_col = array();
    $selected_tbl = $_POST['table-select'];
    $selected_col[] = $_POST['column-select'];
    $tmp_msg = PMA_syncUniqueColumns($selected_col, false, $selected_tbl);
}
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('jquery/jquery.uitablefilter.js');
$scripts->addFile('jquery/jquery.tablesorter.js');
$scripts->addFile('db_central_columns.js');
$cfgCentralColumns = PMA_centralColumnsGetParams();
$pmadb = $cfgCentralColumns['db'];
$pmatable = $cfgCentralColumns['table'];
$max_rows = $GLOBALS['cfg']['MaxRows'];
if (isset($_REQUEST['edit_central_columns_page'])) {
    $selected_fld = $_REQUEST['selected_fld'];
    $selected_db = $_REQUEST['db'];
    $edit_central_column_page = PMA_getHTMLforEditingPage($selected_fld, $selected_db);
    $response->addHTML($edit_central_column_page);
    exit;
}
if (isset($_POST['multi_edit_central_column_save'])) {
    $message = PMA_updateMultipleColumn();
    if (!is_bool($message)) {
        $response->isSuccess(false);
        $response->addJSON('message', $message);
开发者ID:xtreme-jamil-shamy,项目名称:phpmyadmin-cf,代码行数:31,代码来源:db_central_columns.php


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