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


PHP PMA_getFormParametersForInsertForm函數代碼示例

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


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

示例1: testGetFormParametersForInsertForm

    /**
     * Test for PMA_getFormParametersForInsertForm
     *
     * @return void
     */
    public function testGetFormParametersForInsertForm()
    {
        $where_clause = array('foo' => 'bar ', '1' => ' test');
        $_REQUEST['clause_is_unique'] = false;
        $_REQUEST['sql_query'] = 'SELECT a';
        $GLOBALS['goto'] = 'index.php';

        $result = PMA_getFormParametersForInsertForm(
            'dbname', 'tablename', false, $where_clause, 'localhost'
        );

        $this->assertEquals(
            array(
                'db'        => 'dbname',
                'table'     => 'tablename',
                'goto'      => 'index.php',
                'err_url'   => 'localhost',
                'sql_query' => 'SELECT a',
                'where_clause[foo]' => 'bar',
                'where_clause[1]' => 'test',
                'clause_is_unique' => false
            ),
            $result
        );
    }
開發者ID:roccivic,項目名稱:phpmyadmin,代碼行數:30,代碼來源:PMA_insert_edit_test.php

示例2: PMA_getTableColumns

$scripts->addFile('jquery/jquery.validate.js');
$scripts->addFile('jquery/additional-methods.js');
$scripts->addFile('gis_data_editor.js');
/**
 * Displays the query submitted and its result
 *
 * $disp_message come from tbl_replace.php
 */
if (!empty($disp_message)) {
    $response->addHTML(Util::getMessage($disp_message, null));
}
$table_columns = PMA_getTableColumns($db, $table);
// retrieve keys into foreign fields, if any
$foreigners = PMA_getForeigners($db, $table);
// Retrieve form parameters for insert/edit form
$_form_params = PMA_getFormParametersForInsertForm($db, $table, $where_clauses, $where_clause_array, $err_url);
/**
 * Displays the form
 */
// autocomplete feature of IE kills the "onchange" event handler and it
//        must be replaced by the "onpropertychange" one in this case
$chg_evt_handler = 'onchange';
// Had to put the URI because when hosted on an https server,
// some browsers send wrongly this form to the http server.
$html_output = '';
// Set if we passed the first timestamp field
$timestamp_seen = false;
$columns_cnt = count($table_columns);
$tabindex = 0;
$tabindex_for_function = +3000;
$tabindex_for_null = +6000;
開發者ID:poush,項目名稱:phpmyadmin,代碼行數:31,代碼來源:tbl_change.php


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