當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PMA_getTrackingSet函數代碼示例

本文整理匯總了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));
    }
}
開發者ID:saisai,項目名稱:phpmyadmin,代碼行數:14,代碼來源:tracking.lib.php

示例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);
 }
開發者ID:xtreme-jamil-shamy,項目名稱:phpmyadmin-cf,代碼行數:34,代碼來源:PMA_tbl_tracking_test.php

示例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();
    }
}
開發者ID:minggLu,項目名稱:openemr,代碼行數:14,代碼來源:tbl_tracking.lib.php


注:本文中的PMA_getTrackingSet函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。