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


PHP PMA_getColumnTitle函数代码示例

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


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

示例1: PMA_analyzeTableColumnsArray

/**
 * Analyze the table column array
 *
 * @param array   $column         description of column in given table
 * @param array   $comments_map   comments for every column that has a comment
 * @param boolean $timestamp_seen whether a timestamp has been seen
 *
 * @return array                   description of column in given table
 */
function PMA_analyzeTableColumnsArray($column, $comments_map, $timestamp_seen)
{
    $column['Field_html'] = htmlspecialchars($column['Field']);
    $column['Field_md5'] = md5($column['Field']);
    // True_Type contains only the type (stops at first bracket)
    $column['True_Type'] = preg_replace('@\\(.*@s', '', $column['Type']);
    $column['len'] = preg_match('@float|double@', $column['Type']) ? 100 : -1;
    $column['Field_title'] = PMA_getColumnTitle($column, $comments_map);
    $column['is_binary'] = PMA_isColumn($column, array('binary', 'varbinary'));
    $column['is_blob'] = PMA_isColumn($column, array('blob', 'tinyblob', 'mediumblob', 'longblob'));
    $column['is_char'] = PMA_isColumn($column, array('char', 'varchar'));
    list($column['pma_type'], $column['wrap'], $column['first_timestamp']) = PMA_getEnumSetAndTimestampColumns($column, $timestamp_seen);
    return $column;
}
开发者ID:hewenhao2008,项目名称:phpmyadmin,代码行数:23,代码来源:insert_edit.lib.php

示例2: testGetColumnTitle

 /**
  * Test for PMA_getColumnTitle
  *
  * @return void
  */
 public function testGetColumnTitle()
 {
     $column = array();
     $column['Field'] = 'f1<';
     $column['Field_html'] = 'f1&lt;';
     $this->assertEquals(PMA_getColumnTitle($column, array()), 'f1&lt;');
     $comments = array();
     $comments['f1<'] = 'comment>';
     $result = PMA_getColumnTitle($column, $comments);
     $this->assertContains('title="comment&gt;"', $result);
     $this->assertContains('f1&lt;', $result);
 }
开发者ID:kfjihailong,项目名称:phpMyAdmin,代码行数:17,代码来源:PMA_insert_edit_test.php


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