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


PHP PMA_getHtmlForColumnsList函数代码示例

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


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

示例1: testPMAGetHtmlContentsFor1NFStep3

 /**
  * Test for PMA_getHtmlContentsFor1NFStep3
  *
  * @return void
  */
 public function testPMAGetHtmlContentsFor1NFStep3()
 {
     $db = "PMA_db";
     $table = "PMA_table";
     $result = PMA_getHtmlContentsFor1NFStep3($db, $table);
     $this->assertInternalType('array', $result);
     $this->assertArrayHasKey('legendText', $result);
     $this->assertArrayHasKey('headText', $result);
     $this->assertArrayHasKey('subText', $result);
     $this->assertArrayHasKey('extra', $result);
     $this->assertArrayHasKey('primary_key', $result);
     $this->assertContains(__('Step 1.') . 3, $result['legendText']);
     $this->assertContains(PMA_getHtmlForColumnsList($db, $table, 'all', "checkbox"), $result['extra']);
     $this->assertContains('<input type="submit" id="moveRepeatingGroup"', $result['extra']);
     $this->assertEquals(json_encode(array('id')), $result['primary_key']);
 }
开发者ID:yonh,项目名称:php-mvc,代码行数:21,代码来源:PMA_normalization_test.php

示例2: __

/**
 * Normalization process (temporarily specific to 1NF)
 *
 * @package PhpMyAdmin
 */
/**
 *
 */
require_once 'libraries/common.inc.php';
require_once 'libraries/transformations.lib.php';
require_once 'libraries/normalization.lib.php';
require_once 'libraries/Index.class.php';
if (isset($_REQUEST['getColumns'])) {
    $html = '<option selected disabled>' . __('Select one…') . '</option>' . '<option value="no_such_col">' . __('No such column') . '</option>';
    //get column whose datatype falls under string category
    $html .= PMA_getHtmlForColumnsList($db, $table, _pgettext('string types', 'String'));
    echo $html;
    exit;
}
if (isset($_REQUEST['splitColumn'])) {
    $num_fields = $_REQUEST['numFields'];
    $html = PMA_getHtmlForCreateNewColumn($num_fields, $db, $table);
    $html .= PMA_URL_getHiddenInputs($db, $table);
    echo $html;
    exit;
}
if (isset($_REQUEST['addNewPrimary'])) {
    $num_fields = 1;
    $columnMeta = array('Field' => $table . "_id", 'Extra' => 'auto_increment');
    $html = PMA_getHtmlForCreateNewColumn($num_fields, $db, $table, $columnMeta);
    $html .= PMA_URL_getHiddenInputs($db, $table);
开发者ID:mi-squared,项目名称:openemr,代码行数:31,代码来源:normalization.php

示例3: PMA_getHtmlContentsFor1NFStep3

/**
 * build the html contents of various html elements in step 1.3
 *
 * @param string $db    current database
 * @param string $table current table
 *
 * @return string HTML contents for step 1.3
 */
function PMA_getHtmlContentsFor1NFStep3($db, $table)
{
    $step = 3;
    $stepTxt = __('Move repeating groups');
    $legendText = __('Step 1.') . $step . " " . $stepTxt;
    $headText = __("Do you have a group of two or more columns that are closely " . "related and are all repeating the same attribute? For example, " . "a table that holds data on books might have columns such as book_id, " . "author1, author2, author3 and so on which form a " . "repeating group. In this case a new table (book_id, author) should " . "be created.");
    $subText = __("Check the columns which form a repeating group. " . "If no such group, click on 'No repeating group'");
    $extra = PMA_getHtmlForColumnsList($db, $table, 'all', "checkbox") . "</br>" . '<input type="submit" id="moveRepeatingGroup" value="' . __('Done') . '"/>' . '<input type="submit" value="' . __('No repeating group') . '" onclick="goToStep4();"' . '/>';
    $primary = PMA\libraries\Index::getPrimary($table, $db);
    $primarycols = $primary->getColumns();
    $pk = array();
    foreach ($primarycols as $col) {
        $pk[] = $col->getName();
    }
    $res = array('legendText' => $legendText, 'headText' => $headText, 'subText' => $subText, 'extra' => $extra, 'primary_key' => json_encode($pk));
    return $res;
}
开发者ID:flash1452,项目名称:phpmyadmin,代码行数:25,代码来源:normalization.lib.php


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