本文整理汇总了PHP中PMA_Table::analyzeStructure方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_Table::analyzeStructure方法的具体用法?PHP PMA_Table::analyzeStructure怎么用?PHP PMA_Table::analyzeStructure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMA_Table
的用法示例。
在下文中一共展示了PMA_Table::analyzeStructure方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testAnalyzeStructure
/**
* Test for analyzeStructure
*
* @return void
*/
public function testAnalyzeStructure()
{
$this->assertEquals(false, PMA_Table::analyzeStructure());
//validate that it is the same as DBI fetchResult
$show_create_table = PMA_Table::analyzeStructure('PMA', 'PMA_BookMark');
$this->assertEquals(array('type' => 'DATA_TYPE'), $show_create_table[0]['create_table_fields']['COLUMN_NAME']);
//not a view
$show_create_table = PMA_Table::analyzeStructure('PMA', 'PMA_BookMark_2');
$this->assertEquals(array('type' => 'INT', 'timestamp_not_null' => false), $show_create_table[0]['create_table_fields']['id']);
$this->assertEquals(array('type' => 'TEXT', 'timestamp_not_null' => false), $show_create_table[0]['create_table_fields']['username']);
}
示例2:
$scripts->addFile('functions.js');
$scripts->addFile('sql.js');
$scripts->addFile('tbl_change.js');
$scripts->addFile('big_ints.js');
$scripts->addFile('jquery/jquery-ui-timepicker-addon.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(PMA_Util::getMessage($disp_message, null));
}
// used as a global by PMA_Util::getDefaultFunctionForField()
$analyzed_sql = PMA_Table::analyzeStructure($db, $table);
$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 = PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5 && PMA_USR_BROWSER_VER < 7 ? 'onpropertychange' : '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