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


PHP PMA_getHtmlForReferentialIntegrityCheck函數代碼示例

本文整理匯總了PHP中PMA_getHtmlForReferentialIntegrityCheck函數的典型用法代碼示例。如果您正苦於以下問題:PHP PMA_getHtmlForReferentialIntegrityCheck函數的具體用法?PHP PMA_getHtmlForReferentialIntegrityCheck怎麽用?PHP PMA_getHtmlForReferentialIntegrityCheck使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了PMA_getHtmlForReferentialIntegrityCheck函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testGetHtmlForReferentialIntegrityCheck

 /**
  * Test for PMA_getHtmlForReferentialIntegrityCheck
  *
  * @return void
  */
 public function testGetHtmlForReferentialIntegrityCheck()
 {
     $this->assertRegExp('/.*Check referential integrity.*href="sql.php(.|[\\n])*/m', PMA_getHtmlForReferentialIntegrityCheck(array(array('foreign_db' => 'db1', 'foreign_table' => "foreign1", 'foreign_field' => "foreign2")), array("param1" => 'a', "param2" => 'b')));
 }
開發者ID:FilipeRamosFernandes,項目名稱:phpmyadmin,代碼行數:9,代碼來源:PMA_operations_test.php

示例2: array_merge

    if (!(isset($db_is_system_schema) && $db_is_system_schema)) {
        $this_sql_query = 'DROP TABLE ' . PMA\libraries\Util::backquote($GLOBALS['table']);
        $drop_table_url_params = array_merge($url_params, array('sql_query' => $this_sql_query, 'goto' => 'db_operations.php', 'reload' => '1', 'purge' => '1', 'message_to_show' => sprintf($tbl_is_view ? __('View %s has been dropped.') : __('Table %s has been dropped.'), htmlspecialchars($table)), 'table' => $GLOBALS['table']));
    }
    $response->addHTML(PMA_getHtmlForDeleteDataOrTable($truncate_table_url_params, $drop_table_url_params));
}
if (Partition::havePartitioning()) {
    $partition_names = Partition::getPartitionNames($db, $table);
    // show the Partition maintenance section only if we detect a partition
    if (!is_null($partition_names[0])) {
        $response->addHTML(PMA_getHtmlForPartitionMaintenance($partition_names, $url_params));
    }
    // end if
}
// end if
unset($partition_names);
// Referential integrity check
// The Referential integrity check was intended for the non-InnoDB
// tables for which the relations are defined in pmadb
// so I assume that if the current table is InnoDB, I don't display
// this choice (InnoDB maintains integrity by itself)
if ($cfgRelation['relwork'] && !$is_innodb) {
    $GLOBALS['dbi']->selectDb($GLOBALS['db']);
    $foreign = PMA_getForeigners($GLOBALS['db'], $GLOBALS['table'], '', 'internal');
    if (!empty($foreign)) {
        $response->addHTML(PMA_getHtmlForReferentialIntegrityCheck($foreign, $url_params));
    }
    // end if ($foreign)
}
// end  if (!empty($cfg['Server']['relation']))
$response->addHTML('</div>');
開發者ID:wp-cloud,項目名稱:phpmyadmin,代碼行數:31,代碼來源:tbl_operations.php

示例3: PMA_getHtmlForPartitionMaintenance

if (PMA_Partition::havePartitioning()) {
    $partition_names = PMA_Partition::getPartitionNames($db, $table);
    // show the Partition maintenance section only if we detect a partition
    if (! is_null($partition_names[0])) {
        $response->addHTML(
            PMA_getHtmlForPartitionMaintenance($partition_names, $url_params)
        );
    } // end if
} // end if
unset($partition_names);

// Referential integrity check
// The Referential integrity check was intended for the non-InnoDB
// tables for which the relations are defined in pmadb
// so I assume that if the current table is InnoDB, I don't display
// this choice (InnoDB maintains integrity by itself)

if ($cfgRelation['relwork'] && ! $is_innodb) {
    PMA_DBI_select_db($GLOBALS['db']);
    $foreign = PMA_getForeigners($GLOBALS['db'], $GLOBALS['table']);

    if ($foreign) {
        $response->addHTML(
            PMA_getHtmlForReferentialIntegrityCheck($foreign, $url_params)
        );
    } // end if ($foreign)

} // end  if (!empty($cfg['Server']['relation']))

?>
開發者ID:nhodges,項目名稱:phpmyadmin,代碼行數:30,代碼來源:tbl_operations.php


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