本文整理汇总了PHP中PMA_getTrackingSet函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_getTrackingSet函数的具体用法?PHP PMA_getTrackingSet怎么用?PHP PMA_getTrackingSet使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_getTrackingSet函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMA_createTrackingForMultipleTables
/**
* Create tracking version for multiple tables
*
* @param array $selected list of selected tables
*
* @return void
*/
function PMA_createTrackingForMultipleTables($selected)
{
$tracking_set = PMA_getTrackingSet();
foreach ($selected as $selected_table) {
PMA_Tracker::createVersion($GLOBALS['db'], $selected_table, $_REQUEST['version'], $tracking_set, PMA_Table::isView($GLOBALS['db'], $selected_table));
}
}
示例2: testPMAGetTrackingSet
/**
* Tests for PMA_getTrackingSet() method.
*
* @return void
* @test
*/
public function testPMAGetTrackingSet()
{
$_REQUEST['alter_table'] = false;
$_REQUEST['rename_table'] = true;
$_REQUEST['create_table'] = true;
$_REQUEST['drop_table'] = true;
$_REQUEST['create_index'] = false;
$_REQUEST['drop_index'] = true;
$_REQUEST['insert'] = true;
$_REQUEST['update'] = false;
$_REQUEST['delete'] = true;
$_REQUEST['truncate'] = true;
$tracking_set = PMA_getTrackingSet();
$this->assertEquals('RENAME TABLE,CREATE TABLE,DROP TABLE,DROP INDEX,INSERT,DELETE,TRUNCATE', $tracking_set);
//other set to true
$_REQUEST['alter_table'] = true;
$_REQUEST['rename_table'] = false;
$_REQUEST['create_table'] = false;
$_REQUEST['drop_table'] = false;
$_REQUEST['create_index'] = true;
$_REQUEST['drop_index'] = false;
$_REQUEST['insert'] = false;
$_REQUEST['update'] = true;
$_REQUEST['delete'] = false;
$_REQUEST['truncate'] = false;
$tracking_set = PMA_getTrackingSet();
$this->assertEquals('ALTER TABLE,CREATE INDEX,UPDATE', $tracking_set);
}
示例3: PMA_createTrackingVersion
/**
* Function to create the tracking version
*
* @return void
*/
function PMA_createTrackingVersion()
{
$tracking_set = PMA_getTrackingSet();
$versionCreated = PMA_Tracker::createVersion($GLOBALS['db'], $GLOBALS['table'], $_REQUEST['version'], $tracking_set, PMA_Table::isView($GLOBALS['db'], $GLOBALS['table']));
if ($versionCreated) {
$msg = PMA_Message::success(sprintf(__('Version %1$s was created, tracking for %2$s is active.'), htmlspecialchars($_REQUEST['version']), htmlspecialchars($GLOBALS['db'] . '.' . $GLOBALS['table'])));
$msg->display();
}
}