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


PHP PMA_getHtmlForIndexes函数代码示例

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


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

示例1: testPMAGetHtmlForIndexes

 /**
  * Tests for PMA_getHtmlForIndexes() method.
  *
  * @return void
  * @test
  */
 public function testPMAGetHtmlForIndexes()
 {
     $indexs = array(array('Non_unique' => 0, 'Packed' => '', 'Key_name' => 'Key_name1', 'Index_type' => 'BTREE', 'Column_name' => 'Column_name', 'Cardinality' => 'Cardinality', 'Collation' => 'Collation', 'Null' => 'Null', 'Comment' => 'Comment'));
     $html = PMA_getHtmlForIndexes($indexs);
     $this->assertContains(__('Indexes'), $html);
     $this->assertContains(__('Keyname'), $html);
     $this->assertContains(__('Type'), $html);
     $this->assertContains(__('Unique'), $html);
     $this->assertContains(__('Packed'), $html);
     $this->assertContains(__('Column'), $html);
     $this->assertContains(__('Cardinality'), $html);
     // items
     $this->assertContains(htmlspecialchars($indexs[0]['Key_name']), $html);
     $this->assertContains(htmlspecialchars($indexs[0]['Index_type']), $html);
     $this->assertContains(htmlspecialchars($indexs[0]['Column_name']), $html);
     $this->assertContains(htmlspecialchars($indexs[0]['Cardinality']), $html);
     $this->assertContains(htmlspecialchars($indexs[0]['Collation']), $html);
 }
开发者ID:xtreme-jamil-shamy,项目名称:phpmyadmin-cf,代码行数:24,代码来源:PMA_tbl_tracking_test.php

示例2: PMA_getHtmlForSchemaSnapshot

/**
 * Function to get html for schema snapshot
 *
 * @param string $url_query url query
 *
 * @return string
 */
function PMA_getHtmlForSchemaSnapshot($url_query)
{
    $html = '<h3>' . __('Structure snapshot') . '  [<a href="tbl_tracking.php' . $url_query . '">' . __('Close') . '</a>]</h3>';
    $data = PMA_Tracker::getTrackedData($_REQUEST['db'], $_REQUEST['table'], $_REQUEST['version']);
    // Get first DROP TABLE/VIEW and CREATE TABLE/VIEW statements
    $drop_create_statements = $data['ddlog'][0]['statement'];
    if (mb_strstr($data['ddlog'][0]['statement'], 'DROP TABLE') || mb_strstr($data['ddlog'][0]['statement'], 'DROP VIEW')) {
        $drop_create_statements .= $data['ddlog'][1]['statement'];
    }
    // Print SQL code
    $html .= PMA_Util::getMessage(sprintf(__('Version %s snapshot (SQL code)'), htmlspecialchars($_REQUEST['version'])), $drop_create_statements);
    // Unserialize snapshot
    $temp = unserialize($data['schema_snapshot']);
    $columns = $temp['COLUMNS'];
    $indexes = $temp['INDEXES'];
    $html .= PMA_getHtmlForColumns($columns);
    if (count($indexes) > 0) {
        $html .= PMA_getHtmlForIndexes($indexes);
    }
    // endif
    $html .= '<br /><hr /><br />';
    return $html;
}
开发者ID:saisai,项目名称:phpmyadmin,代码行数:30,代码来源:tracking.lib.php


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