本文整理汇总了PHP中PMA_makeConsistentWithList函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_makeConsistentWithList函数的具体用法?PHP PMA_makeConsistentWithList怎么用?PHP PMA_makeConsistentWithList使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_makeConsistentWithList函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMA_getHtmlShowCreate
$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;
list($what_ret, $query_type_ret, $is_unset_submit_mult, $mult_btn_ret, $centralColsError) = PMA_getDataForSubmitMult($submit_mult, $GLOBALS['db'], $table, $selected, $action);
//update the existing variables
if (isset($what_ret)) {
$what = $what_ret;
}
if (isset($query_type_ret)) {
$query_type = $query_type_ret;
}
示例2: testPMAMakeConsistentWithList
/**
* Test for PMA_makeConsistentWithList
*
* @return void
*/
public function testPMAMakeConsistentWithList()
{
$GLOBALS['dbi']->expects($this->any())->method('fetchResult')->will($this->returnValue($this->_columnData));
$GLOBALS['dbi']->expects($this->any())->method('fetchValue')->will($this->returnValue('PMA_table=CREATE table `PMA_table` (id integer)'));
$this->assertTrue(PMA_makeConsistentWithList("phpmyadmin", array('PMA_table')));
}
示例3: testPMAMakeConsistentWithList
/**
* Test for PMA_makeConsistentWithList
*
* @return void
*/
public function testPMAMakeConsistentWithList()
{
$dbi = $GLOBALS['dbi'];
$dbitmp = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
$GLOBALS['dbi'] = $dbitmp;
$dbitmp->expects($this->any())->method('selectDb')->will($this->returnValue(true));
$dbitmp->expects($this->any())->method('getColumnNames')->will($this->returnValue(array("id", "col1", "col2")));
$dbitmp->expects($this->any())->method('tryQuery')->will($this->returnValue(true));
$dbitmp->expects($this->any())->method('fetchResult')->will($this->returnValue(array(array('col_name' => "id", "col_type" => 'integer', 'col_length' => 0, 'col_isNull' => 0, 'col_extra' => '', 'col_default' => 1), array('col_name' => "col1", 'col_type' => 'varchar', 'col_length' => 100, 'col_isNull' => 1, 'col_extra' => '', 'col_default' => 1), array('col_name' => "col2", 'col_type' => 'DATETIME', 'col_length' => 0, 'col_isNull' => 1, 'col_extra' => '', 'col_default' => 'CURRENT_TIMESTAMP'))));
$dbitmp->expects($this->any())->method('fetchValue')->will($this->returnValue('PMA_table=CREATE table `PMA_table` (id integer)'));
$this->assertTrue(PMA_makeConsistentWithList("phpmyadmin", array('PMA_table')));
$GLOBALS['dbi'] = $dbi;
}