當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PMA_updateOneColumn函數代碼示例

本文整理匯總了PHP中PMA_updateOneColumn函數的典型用法代碼示例。如果您正苦於以下問題:PHP PMA_updateOneColumn函數的具體用法?PHP PMA_updateOneColumn怎麽用?PHP PMA_updateOneColumn使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了PMA_updateOneColumn函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: PMA_updateMultipleColumn

/**
 * Update Multiple column in central columns list if a chnage is requested
 *
 * @return true|PMA\libraries\Message
 */
function PMA_updateMultipleColumn()
{
    $db = $_POST['db'];
    $col_name = $_POST['field_name'];
    $orig_col_name = $_POST['orig_col_name'];
    $col_default = $_POST['field_default_type'];
    $col_length = $_POST['field_length'];
    $col_attribute = $_POST['field_attribute'];
    $col_type = $_POST['field_type'];
    $collation = $_POST['field_collation'];
    $col_isNull = array();
    $col_extra = array();
    $num_central_fields = count($orig_col_name);
    for ($i = 0; $i < $num_central_fields; $i++) {
        $col_isNull[$i] = isset($_POST['field_null'][$i]) ? 1 : 0;
        $col_extra[$i] = isset($_POST['col_extra'][$i]) ? $_POST['col_extra'][$i] : '';
        if ($col_default[$i] == 'NONE') {
            $col_default[$i] = "";
        } else {
            if ($col_default[$i] == 'USER_DEFINED') {
                $col_default[$i] = $_POST['field_default_value'][$i];
            }
        }
        $message = PMA_updateOneColumn($db, $orig_col_name[$i], $col_name[$i], $col_type[$i], $col_attribute[$i], $col_length[$i], $col_isNull[$i], $collation[$i], $col_extra[$i], $col_default[$i]);
        if (!is_bool($message)) {
            return $message;
        }
    }
    return true;
}
開發者ID:itgsod-philip-skalander,項目名稱:phpmyadmin,代碼行數:35,代碼來源:central_columns.lib.php

示例2: testPMAUpdateOneColumn

 /**
  * Test for PMA_updateOneColumn
  *
  * @return void
  */
 public function testPMAUpdateOneColumn()
 {
     $this->assertTrue(PMA_updateOneColumn("phpmyadmin", "", "", "", "", "", "", "", "", ""));
     $this->assertTrue(PMA_updateOneColumn("phpmyadmin", "col1", "", "", "", "", "", "", "", ""));
 }
開發者ID:nobodypb,項目名稱:phpmyadmin,代碼行數:10,代碼來源:PMA_central_columns_test.php

示例3: isset

    }
    $col_default = $_POST['col_default'];
    if ($col_default == 'NONE' && $_POST['col_default_sel'] != 'USER_DEFINED') {
        $col_default = "";
    }
    $col_extra = isset($_POST['col_extra']) ? $_POST['col_extra'] : '';
    $col_isNull = isset($_POST['col_isNull']) ? 1 : 0;
    $col_length = $_POST['col_length'];
    $col_attribute = $_POST['col_attribute'];
    $col_type = $_POST['col_type'];
    $collation = $_POST['collation'];
    if (isset($orig_col_name) && $orig_col_name) {
        echo PMA_updateOneColumn($db, $orig_col_name, $col_name, $col_type, $col_attribute, $col_length, $col_isNull, $collation, $col_extra, $col_default);
        exit;
    } else {
        $tmp_msg = PMA_updateOneColumn($db, "", $col_name, $col_type, $col_attribute, $col_length, $col_isNull, $collation, $col_extra, $col_default);
    }
}
if (isset($_POST['populateColumns'])) {
    $selected_tbl = $_POST['selectedTable'];
    echo PMA_getHTMLforColumnDropdown($db, $selected_tbl);
    exit;
}
if (isset($_POST['getColumnList'])) {
    echo PMA_getCentralColumnsListRaw($db, $_POST['cur_table']);
    exit;
}
if (isset($_POST['add_column'])) {
    $selected_col = array();
    $selected_tbl = $_POST['table-select'];
    $selected_col[] = $_POST['column-select'];
開發者ID:xtreme-jamil-shamy,項目名稱:phpmyadmin-cf,代碼行數:31,代碼來源:db_central_columns.php


注:本文中的PMA_updateOneColumn函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。