本文整理汇总了PHP中PMA_syncUniqueColumns函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_syncUniqueColumns函数的具体用法?PHP PMA_syncUniqueColumns怎么用?PHP PMA_syncUniqueColumns使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_syncUniqueColumns函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testPMASyncUniqueColumns
/**
* Test for PMA_syncUniqueColumns
*
* @return void
*/
public function testPMASyncUniqueColumns()
{
$_REQUEST['db'] = 'PMA_db';
$_REQUEST['table'] = 'PMA_table';
$this->assertTrue(PMA_syncUniqueColumns(array('PMA_table')));
}
示例2: __
$mult_btn = __('Yes');
break;
case 'export':
unset($submit_mult);
include 'db_export.php';
exit;
break;
case 'show_create':
$show_create = PMA_getHtmlShowCreate($GLOBALS['db'], $selected);
// Send response to client.
$response = PMA_Response::getInstance();
$response->addJSON('message', $show_create);
exit;
case 'sync_unique_columns_central_list':
include_once 'libraries/central_columns.lib.php';
$centralColsError = PMA_syncUniqueColumns($selected);
break;
case 'delete_unique_columns_central_list':
include_once 'libraries/central_columns.lib.php';
$centralColsError = PMA_deleteColumnsFromList($selected);
break;
case 'make_consistent_with_central_list':
include_once 'libraries/central_columns.lib.php';
$centralColsError = PMA_makeConsistentWithList($GLOBALS['db'], $selected);
break;
}
// end switch
} elseif (isset($selected_fld) && !empty($selected_fld)) {
// coming from table structure view - do something with
// selected columns
$selected = $selected_fld;
示例3: getDataForSubmitMult
/**
* Get List of information for Submit Mult
*
* @param string $submit_mult mult_submit type
* @param array $selected the selected columns
* @param string $action action type
*
* @return array
*/
protected function getDataForSubmitMult($submit_mult, $selected, $action)
{
$what = null;
$query_type = null;
$is_unset_submit_mult = false;
$mult_btn = null;
$centralColsError = null;
switch ($submit_mult) {
case 'drop':
$what = 'drop_fld';
break;
case 'primary':
// Gets table primary key
$primary = $this->getKeyForTablePrimary();
if (empty($primary)) {
// no primary key, so we can safely create new
$is_unset_submit_mult = true;
$query_type = 'primary_fld';
$mult_btn = __('Yes');
} else {
// primary key exists, so lets as user
$what = 'primary_fld';
}
break;
case 'index':
$is_unset_submit_mult = true;
$query_type = 'index_fld';
$mult_btn = __('Yes');
break;
case 'unique':
$is_unset_submit_mult = true;
$query_type = 'unique_fld';
$mult_btn = __('Yes');
break;
case 'spatial':
$is_unset_submit_mult = true;
$query_type = 'spatial_fld';
$mult_btn = __('Yes');
break;
case 'ftext':
$is_unset_submit_mult = true;
$query_type = 'fulltext_fld';
$mult_btn = __('Yes');
break;
case 'add_to_central_columns':
include_once 'libraries/central_columns.lib.php';
$centralColsError = PMA_syncUniqueColumns($selected, false);
break;
case 'remove_from_central_columns':
include_once 'libraries/central_columns.lib.php';
$centralColsError = PMA_deleteColumnsFromList($selected, false);
break;
case 'change':
$this->displayHtmlForColumnChange($selected, $action);
// execution stops here but PMA_Response correctly finishes
// the rendering
exit;
case 'browse':
// this should already be handled by tbl_structure.php
}
return array($what, $query_type, $is_unset_submit_mult, $mult_btn, $centralColsError);
}
示例4: PMA_getHTMLforColumnDropdown
}
}
if (isset($_POST['populateColumns'])) {
$selected_tbl = $_POST['selectedTable'];
echo PMA_getHTMLforColumnDropdown($db, $selected_tbl);
exit;
}
if (isset($_POST['getColumnList'])) {
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);
示例5: testPMASyncUniqueColumns
/**
* Test for PMA_syncUniqueColumns
*
* @return void
*/
public function testPMASyncUniqueColumns()
{
$field_select = array("col1");
$_POST['db'] = 'PMA_db';
$_POST['table'] = 'PMA_table';
$this->assertInstanceOf('PMA_Message', PMA_syncUniqueColumns($field_select, false));
$field_select = array("PMA_table");
$this->assertInstanceOf('PMA_Message', PMA_syncUniqueColumns($field_select));
}