Use new parser for table's structure.
Signed-off-by: Dan Ungureanu <udan1107@gmail.com>
This commit is contained in:
parent
6c3ccb2d56
commit
11adecc1d8
@ -115,9 +115,9 @@ foreach ($fields as $row) {
|
||||
$attribute = $extracted_columnspec['attribute'];
|
||||
|
||||
// prepare a common variable to reuse below; however,
|
||||
// in case of a VIEW, $analyzed_sql[0]['create_table_fields'] is empty
|
||||
if (isset($analyzed_sql[0]['create_table_fields'][$row['Field']])) {
|
||||
$tempField = $analyzed_sql[0]['create_table_fields'][$row['Field']];
|
||||
// in case of a VIEW, $create_table_fields is empty
|
||||
if (isset($create_table_fields[$row['Field']])) {
|
||||
$tempField = $create_table_fields[$row['Field']];
|
||||
} else {
|
||||
$tempField = array();
|
||||
}
|
||||
|
||||
@ -199,7 +199,8 @@ $show_create_table = $GLOBALS['dbi']->fetchValue(
|
||||
. PMA_Util::backquote($table),
|
||||
0, 1
|
||||
);
|
||||
$analyzed_sql = PMA_SQP_analyze(PMA_SQP_parse($show_create_table));
|
||||
$parser = new SqlParser\Parser($show_create_table);
|
||||
$create_table_fields = SqlParser\Utils\Table::getFields($parser->statements[0]);
|
||||
|
||||
/**
|
||||
* prepare table infos
|
||||
|
||||
Loading…
Reference in New Issue
Block a user