当前位置: 首页>>代码示例>>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;未经允许,请勿转载。