當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。