added method PMA_getTableFields
This commit is contained in:
parent
721a44f0b4
commit
7d17bd34d7
@ -2372,4 +2372,18 @@ function PMA_verifyWhetherValueCanBeTruncatedAndAppendExtraData(
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to get the fields of a table
|
||||
*
|
||||
* @param string $db current db
|
||||
* @param string $table current table
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function PMA_getTableFields($db, $table)
|
||||
{
|
||||
$GLOBALS['dbi']->selectDb($db);
|
||||
return array_values($GLOBALS['dbi']->getColumns($db, $table));
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@ -119,12 +119,8 @@ if (! empty($disp_message)) {
|
||||
$response->addHTML(PMA_Util::getMessage($disp_message, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of the fields of the current table
|
||||
*/
|
||||
$GLOBALS['dbi']->selectDb($db);
|
||||
$table_fields = array_values($GLOBALS['dbi']->getColumns($db, $table));
|
||||
|
||||
$table_fields = PMA_getTableFields($db, $table);
|
||||
|
||||
/**
|
||||
* Determine what to do, edit or insert?
|
||||
|
||||
Loading…
Reference in New Issue
Block a user