当前位置: 首页>>代码示例>>PHP>>正文


PHP PMA_getHtmlForPartitionMaintenance函数代码示例

本文整理汇总了PHP中PMA_getHtmlForPartitionMaintenance函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_getHtmlForPartitionMaintenance函数的具体用法?PHP PMA_getHtmlForPartitionMaintenance怎么用?PHP PMA_getHtmlForPartitionMaintenance使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了PMA_getHtmlForPartitionMaintenance函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

    $drop_table_url_params = array();
    if (!$tbl_is_view && !(isset($db_is_system_schema) && $db_is_system_schema)) {
        $this_sql_query = 'TRUNCATE TABLE ' . PMA\libraries\Util::backquote($GLOBALS['table']);
        $truncate_table_url_params = array_merge($url_params, array('sql_query' => $this_sql_query, 'goto' => 'tbl_structure.php', 'reload' => '1', 'message_to_show' => sprintf(__('Table %s has been emptied.'), htmlspecialchars($table))));
    }
    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));
开发者ID:wp-cloud,项目名称:phpmyadmin,代码行数:31,代码来源:tbl_operations.php

示例2: testGetHtmlForPartitionMaintenance

 /**
  * Test for PMA_getHtmlForPartitionMaintenance
  *
  * @return void
  */
 public function testGetHtmlForPartitionMaintenance()
 {
     $html = PMA_getHtmlForPartitionMaintenance(array("partition1", "partion2"), array("param1" => 'foo', "param2" => 'bar'));
     $this->assertRegExp('/.*action="tbl_operations.php".*/', $html);
     $this->assertRegExp('/.*ANALYZE.*/', $html);
     $this->assertRegExp('/.*REBUILD.*/', $html);
 }
开发者ID:pboutin44,项目名称:maintest,代码行数:12,代码来源:PMA_operations_test.php

示例3: testGetHtmlForPartitionMaintenance

 /**
  * Test for PMA_getHtmlForPartitionMaintenance
  *
  * @return void
  */
 public function testGetHtmlForPartitionMaintenance()
 {
     $this->assertRegExp('/.*action="tbl_operations.php"(.|[\\n])*ANALYZE([\\n]|.)*REBUILD([\\n]|.)*/m', PMA_getHtmlForPartitionMaintenance(array("partition1", "partion2"), array("param1" => 'foo', "param2" => 'bar')));
 }
开发者ID:FilipeRamosFernandes,项目名称:phpmyadmin,代码行数:9,代码来源:PMA_operations_test.php

示例4: PMA_getHtmlForDeleteDataOrTable

    }
    $response->addHTML(
        PMA_getHtmlForDeleteDataOrTable(
            $truncate_table_url_params,
            $drop_table_url_params
        )
    );
}
$response->addHTML('<br class="clearfloat">');

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']);
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:30,代码来源:tbl_operations.php


注:本文中的PMA_getHtmlForPartitionMaintenance函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。