本文整理匯總了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();
}
}