PMA_DBI_get_columns --> PMA_DBI_getColumns
This commit is contained in:
parent
618a37403a
commit
32e6c06324
@ -116,7 +116,7 @@ foreach ($tables as $table) {
|
||||
/**
|
||||
* Gets columns properties
|
||||
*/
|
||||
$columns = PMA_DBI_get_columns($db, $table);
|
||||
$columns = PMA_DBI_getColumns($db, $table);
|
||||
$fields_cnt = count($columns);
|
||||
|
||||
if (PMA_MYSQL_INT_VERSION < 50025) {
|
||||
|
||||
@ -270,7 +270,7 @@ class PMA_DbQbe
|
||||
}
|
||||
// The tables list gets from MySQL
|
||||
while (list($table) = PMA_DBI_fetch_row($all_tables)) {
|
||||
$columns = PMA_DBI_get_columns($this->_db, $table);
|
||||
$columns = PMA_DBI_getColumns($this->_db, $table);
|
||||
|
||||
if (empty($this->_criteriaTables[$table])
|
||||
&& ! empty($_REQUEST['TableList'])
|
||||
|
||||
@ -193,7 +193,7 @@ class PMA_DbSearch
|
||||
{
|
||||
$where_clause = '';
|
||||
// Columns to select
|
||||
$allColumns = PMA_DBI_get_columns($GLOBALS['db'], $table);
|
||||
$allColumns = PMA_DBI_getColumns($GLOBALS['db'], $table);
|
||||
$likeClauses = array();
|
||||
// Based on search type, decide like/regex & '%'/''
|
||||
$like_or_regex = (($this->_criteriaSearchType == 4) ? 'REGEXP' : 'LIKE');
|
||||
|
||||
@ -123,7 +123,7 @@ class PMA_TableSearch
|
||||
private function _loadTableInfo()
|
||||
{
|
||||
// Gets the list and number of columns
|
||||
$columns = PMA_DBI_get_columns($this->_db, $this->_table, null, true);
|
||||
$columns = PMA_DBI_getColumns($this->_db, $this->_table, null, true);
|
||||
// Get details about the geometry fucntions
|
||||
$geom_types = PMA_Util::getGISDatatypes();
|
||||
|
||||
|
||||
@ -275,7 +275,7 @@ class PMA_Tracker
|
||||
|
||||
// Get data definition snapshot of table
|
||||
|
||||
$columns = PMA_DBI_get_columns($dbname, $tablename, null, true);
|
||||
$columns = PMA_DBI_getColumns($dbname, $tablename, null, true);
|
||||
// int indices to reduce size
|
||||
$columns = array_values($columns);
|
||||
// remove Privileges to reduce size
|
||||
|
||||
@ -3316,7 +3316,7 @@ class PMA_Util
|
||||
|
||||
/* Fetch columns list if required */
|
||||
if (strpos($string, '@COLUMNS@') !== false) {
|
||||
$columns_list = PMA_DBI_get_columns($GLOBALS['db'], $GLOBALS['table']);
|
||||
$columns_list = PMA_DBI_getColumns($GLOBALS['db'], $GLOBALS['table']);
|
||||
|
||||
// sometimes the table no longer exists at this point
|
||||
if (! is_null($columns_list)) {
|
||||
|
||||
@ -1210,7 +1210,7 @@ function PMA_DBI_getColumnsFull($database = null, $table = null,
|
||||
/**
|
||||
* Returns SQL query for fetching columns for a table
|
||||
*
|
||||
* The 'Key' column is not calculated properly, use PMA_DBI_get_columns() to get
|
||||
* The 'Key' column is not calculated properly, use PMA_DBI_getColumns() to get
|
||||
* correct values.
|
||||
*
|
||||
* @param string $database name of database
|
||||
@ -1218,7 +1218,7 @@ function PMA_DBI_getColumnsFull($database = null, $table = null,
|
||||
* @param string $column name of column, null to show all columns
|
||||
* @param boolean $full whether to return full info or only column names
|
||||
*
|
||||
* @see PMA_DBI_get_columns()
|
||||
* @see PMA_DBI_getColumns()
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@ -1290,7 +1290,7 @@ function PMA_DBI_getColumnsSql($database, $table, $column = null, $full = false)
|
||||
* @return false|array array indexed by column names or,
|
||||
* if $column is given, flat array description
|
||||
*/
|
||||
function PMA_DBI_get_columns($database, $table, $column = null, $full = false,
|
||||
function PMA_DBI_getColumns($database, $table, $column = null, $full = false,
|
||||
$link = null
|
||||
) {
|
||||
$sql = PMA_DBI_getColumnsSql($database, $table, $column, $full);
|
||||
|
||||
@ -297,7 +297,7 @@ class ExportHtmlword extends ExportPlugin
|
||||
}
|
||||
}
|
||||
|
||||
$columns = PMA_DBI_get_columns($db, $view);
|
||||
$columns = PMA_DBI_getColumns($db, $view);
|
||||
foreach ($columns as $column) {
|
||||
$schema_insert .= $this->formatOneColumnDefinition(
|
||||
$column,
|
||||
@ -418,7 +418,7 @@ class ExportHtmlword extends ExportPlugin
|
||||
}
|
||||
$schema_insert .= '</tr>';
|
||||
|
||||
$columns = PMA_DBI_get_columns($db, $table);
|
||||
$columns = PMA_DBI_getColumns($db, $table);
|
||||
/**
|
||||
* Get the unique keys in the table
|
||||
*/
|
||||
|
||||
@ -563,7 +563,7 @@ class ExportLatex extends ExportPlugin
|
||||
return false;
|
||||
}
|
||||
|
||||
$fields = PMA_DBI_get_columns($db, $table);
|
||||
$fields = PMA_DBI_getColumns($db, $table);
|
||||
foreach ($fields as $row) {
|
||||
$extracted_columnspec
|
||||
= PMA_Util::extractColumnSpec(
|
||||
|
||||
@ -202,7 +202,7 @@ class ExportMediawiki extends ExportPlugin
|
||||
) {
|
||||
switch($export_mode) {
|
||||
case 'create_table':
|
||||
$columns = PMA_DBI_get_columns($db, $table);
|
||||
$columns = PMA_DBI_getColumns($db, $table);
|
||||
$columns = array_values($columns);
|
||||
$row_cnt = count($columns);
|
||||
|
||||
|
||||
@ -368,7 +368,7 @@ class ExportOdt extends ExportPlugin
|
||||
. '</table:table-cell>'
|
||||
. '</table:table-row>';
|
||||
|
||||
$columns = PMA_DBI_get_columns($db, $view);
|
||||
$columns = PMA_DBI_getColumns($db, $view);
|
||||
foreach ($columns as $column) {
|
||||
$GLOBALS['odt_buffer'] .= $this->formatOneColumnDefinition($column);
|
||||
$GLOBALS['odt_buffer'] .= '</table:table-row>';
|
||||
@ -483,7 +483,7 @@ class ExportOdt extends ExportPlugin
|
||||
}
|
||||
$GLOBALS['odt_buffer'] .= '</table:table-row>';
|
||||
|
||||
$columns = PMA_DBI_get_columns($db, $table);
|
||||
$columns = PMA_DBI_getColumns($db, $table);
|
||||
foreach ($columns as $column) {
|
||||
$field_name = $column['Field'];
|
||||
$GLOBALS['odt_buffer'] .= $this->formatOneColumnDefinition($column);
|
||||
|
||||
@ -272,7 +272,7 @@ class ExportTexytext extends ExportPlugin
|
||||
. '|' . __('Default')
|
||||
. "\n|------\n";
|
||||
|
||||
$columns = PMA_DBI_get_columns($db, $view);
|
||||
$columns = PMA_DBI_getColumns($db, $view);
|
||||
foreach ($columns as $column) {
|
||||
$text_output .= $this->formatOneColumnDefinition($column, $unique_keys);
|
||||
$text_output .= "\n";
|
||||
@ -383,7 +383,7 @@ class ExportTexytext extends ExportPlugin
|
||||
}
|
||||
$text_output .= "\n|------\n";
|
||||
|
||||
$columns = PMA_DBI_get_columns($db, $table);
|
||||
$columns = PMA_DBI_getColumns($db, $table);
|
||||
foreach ($columns as $column) {
|
||||
$text_output .= $this->formatOneColumnDefinition($column, $unique_keys);
|
||||
$field_name = $column['Field'];
|
||||
|
||||
@ -177,7 +177,7 @@ class ImportCsv extends AbstractImportCsv
|
||||
}
|
||||
$sql_template .= ' INTO ' . PMA_Util::backquote($table);
|
||||
|
||||
$tmp_fields = PMA_DBI_get_columns($db, $table);
|
||||
$tmp_fields = PMA_DBI_getColumns($db, $table);
|
||||
|
||||
if (empty($csv_columns)) {
|
||||
$fields = $tmp_fields;
|
||||
|
||||
@ -654,7 +654,7 @@ function PMA_getComments($db, $table = '')
|
||||
|
||||
if ($table != '') {
|
||||
// MySQL native column comments
|
||||
$columns = PMA_DBI_get_columns($db, $table, null, true);
|
||||
$columns = PMA_DBI_getColumns($db, $table, null, true);
|
||||
if ($columns) {
|
||||
foreach ($columns as $column) {
|
||||
if (! empty($column['Comment'])) {
|
||||
|
||||
@ -223,7 +223,7 @@ function PMA_replication_print_slaves_table($hidden = false)
|
||||
|
||||
function PMA_replication_get_username_hostname_length()
|
||||
{
|
||||
$fields_info = PMA_DBI_get_columns('mysql', 'user');
|
||||
$fields_info = PMA_DBI_getColumns('mysql', 'user');
|
||||
$username_length = 16;
|
||||
$hostname_length = 41;
|
||||
foreach ($fields_info as $val) {
|
||||
|
||||
@ -1189,7 +1189,7 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema
|
||||
'L', 0, $pdf->PMA_links['doc'][$table]['-']
|
||||
);
|
||||
// $pdf->Ln(1);
|
||||
$fields = PMA_DBI_get_columns($GLOBALS['db'], $table);
|
||||
$fields = PMA_DBI_getColumns($GLOBALS['db'], $table);
|
||||
foreach ($fields as $row) {
|
||||
$pdf->SetX(20);
|
||||
$field_name = $row['Field'];
|
||||
@ -1307,7 +1307,7 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema
|
||||
/**
|
||||
* Gets fields properties
|
||||
*/
|
||||
$columns = PMA_DBI_get_columns($db, $table);
|
||||
$columns = PMA_DBI_getColumns($db, $table);
|
||||
// Check if we can use Relations
|
||||
if (!empty($cfgRelation['relation'])) {
|
||||
// Find which tables are related with the current one and write it in
|
||||
|
||||
@ -573,7 +573,7 @@ class PMA_User_Schema
|
||||
. '</u>';
|
||||
|
||||
if (isset($with_field_names)) {
|
||||
$fields = PMA_DBI_get_columns($db, $temp_sh_page['table_name']);
|
||||
$fields = PMA_DBI_getColumns($db, $temp_sh_page['table_name']);
|
||||
// if the table has been dropped from outside phpMyAdmin,
|
||||
// we can no longer obtain its columns list
|
||||
if ($fields) {
|
||||
|
||||
@ -1238,7 +1238,7 @@ function PMA_getHtmlForDisplayLoginInformationFields($mode = 'new')
|
||||
*/
|
||||
function PMA_getUsernameAndHostnameLength()
|
||||
{
|
||||
$fields_info = PMA_DBI_get_columns('mysql', 'user', null, true);
|
||||
$fields_info = PMA_DBI_getColumns('mysql', 'user', null, true);
|
||||
$username_length = 16;
|
||||
$hostname_length = 41;
|
||||
foreach ($fields_info as $val) {
|
||||
|
||||
@ -214,7 +214,7 @@ function PMA_sqlQueryFormInsert(
|
||||
// Get the list and number of fields
|
||||
// we do a try_query here, because we could be in the query window,
|
||||
// trying to synchonize and the table has not yet been created
|
||||
$fields_list = PMA_DBI_get_columns($db, $GLOBALS['table'], null, true);
|
||||
$fields_list = PMA_DBI_getColumns($db, $GLOBALS['table'], null, true);
|
||||
|
||||
$tmp_db_link = '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase']
|
||||
. '?' . PMA_generate_common_url($db) . '"';
|
||||
|
||||
@ -2231,7 +2231,7 @@ function PMA_displayHtmlForColumnChange($db, $table, $selected, $action)
|
||||
* @todo optimize in case of multiple fields to modify
|
||||
*/
|
||||
for ($i = 0; $i < $selected_cnt; $i++) {
|
||||
$fields_meta[] = PMA_DBI_get_columns($db, $table, $selected[$i], true);
|
||||
$fields_meta[] = PMA_DBI_getColumns($db, $table, $selected[$i], true);
|
||||
}
|
||||
$num_fields = count($fields_meta);
|
||||
// set these globals because tbl_columns_definition_form.inc.php
|
||||
@ -2248,7 +2248,7 @@ function PMA_displayHtmlForColumnChange($db, $table, $selected, $action)
|
||||
// could be executed to replace the info given by SHOW FULL COLUMNS FROM.
|
||||
/**
|
||||
* @todo put this code into a require()
|
||||
* or maybe make it part of PMA_DBI_get_columns();
|
||||
* or maybe make it part of PMA_DBI_getColumns();
|
||||
*/
|
||||
|
||||
// We also need this to correctly learn if a TIMESTAMP is NOT NULL, since
|
||||
|
||||
@ -144,7 +144,7 @@ unset($show_create_table);
|
||||
* Get the list of the fields of the current table
|
||||
*/
|
||||
PMA_DBI_select_db($db);
|
||||
$table_fields = array_values(PMA_DBI_get_columns($db, $table));
|
||||
$table_fields = array_values(PMA_DBI_getColumns($db, $table));
|
||||
|
||||
$paramTableDbArray = array($table, $db);
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ if (strlen($db) == 0) {
|
||||
/**
|
||||
* Defines the url to return to in case of error in a sql statement
|
||||
*/
|
||||
if (PMA_DBI_get_columns($db, $table)) {
|
||||
if (PMA_DBI_getColumns($db, $table)) {
|
||||
// table exists already
|
||||
PMA_Util::mysqlDie(
|
||||
sprintf(__('Table %s already exists!'), htmlspecialchars($table)),
|
||||
|
||||
@ -26,7 +26,7 @@ if (!PMA_DBI_select_db($db)) {
|
||||
}
|
||||
|
||||
/* Check if table exists */
|
||||
if (!PMA_DBI_get_columns($db, $table)) {
|
||||
if (!PMA_DBI_getColumns($db, $table)) {
|
||||
PMA_Util::mysqlDie(__('Invalid table name'));
|
||||
}
|
||||
|
||||
|
||||
@ -225,7 +225,7 @@ $url_params['goto']
|
||||
/**
|
||||
* Get columns names
|
||||
*/
|
||||
$columns = PMA_DBI_get_columns($GLOBALS['db'], $GLOBALS['table']);
|
||||
$columns = PMA_DBI_getColumns($GLOBALS['db'], $GLOBALS['table']);
|
||||
|
||||
/**
|
||||
* Displays the page
|
||||
|
||||
@ -92,7 +92,7 @@ foreach ($the_tables as $key => $table) {
|
||||
/**
|
||||
* Gets fields properties
|
||||
*/
|
||||
$columns = PMA_DBI_get_columns($db, $table);
|
||||
$columns = PMA_DBI_getColumns($db, $table);
|
||||
|
||||
|
||||
// We need this to correctly learn if a TIMESTAMP is NOT NULL, since
|
||||
|
||||
@ -363,7 +363,7 @@ if ($cfgRelation['relwork']
|
||||
|
||||
// Now find out the columns of our $table
|
||||
// need to use PMA_DBI_QUERY_STORE with PMA_DBI_num_rows() in mysqli
|
||||
$columns = PMA_DBI_get_columns($db, $table);
|
||||
$columns = PMA_DBI_getColumns($db, $table);
|
||||
|
||||
if (count($columns) > 0) {
|
||||
|
||||
|
||||
@ -182,7 +182,7 @@ foreach (PMA_Index::getFromTable($table, $db) as $index) {
|
||||
unset($index, $columns, $column_name, $dummy);
|
||||
|
||||
// 3. Get fields
|
||||
$fields = (array) PMA_DBI_get_columns($db, $table, null, true);
|
||||
$fields = (array) PMA_DBI_getColumns($db, $table, null, true);
|
||||
|
||||
// Get more complete field information
|
||||
// For now, this is done just for MySQL 4.1.2+ new TIMESTAMP options
|
||||
|
||||
Loading…
Reference in New Issue
Block a user