本文整理汇总了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
);
}
示例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;