Merge branch 'master' of git://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
This commit is contained in:
commit
232b2a72c6
@ -31,6 +31,7 @@ phpMyAdmin - ChangeLog
|
||||
- bug #3323060 [parser] SQL parser breaks AJAX requests if query has unclosed quotes
|
||||
- bug #3323101 [parser] Invalid escape sequence in SQL parser
|
||||
- bug #3348995 [config] $cfg['Export']['asfile'] set to false does not select asText option
|
||||
- bug #3340151 [export] Working SQL query exports error page
|
||||
|
||||
3.4.3.0 (2011-06-27)
|
||||
- bug #3311170 [sync] Missing helper icons in Synchronize
|
||||
|
||||
@ -1117,6 +1117,7 @@ $cfg['DefaultTabDatabase'] = 'db_structure.php';
|
||||
*/
|
||||
$cfg['DefaultTabTable'] = 'sql.php';
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Export defaults
|
||||
*/
|
||||
@ -1824,6 +1825,7 @@ $cfg['Export']['xml_export_contents'] = true;
|
||||
*/
|
||||
$cfg['Export']['yaml_structure_or_data'] = 'data';
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Import defaults
|
||||
*/
|
||||
@ -2411,6 +2413,7 @@ $cfg['UserprefsDisallow'] = array();
|
||||
*/
|
||||
$cfg['UserprefsDeveloperTab'] = false;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Window title settings
|
||||
*/
|
||||
@ -2521,7 +2524,9 @@ $cfg['DefaultQueryDatabase'] = '';
|
||||
/*******************************************************************************
|
||||
* SQL Query box settings
|
||||
* These are the links display in all of the SQL Query boxes
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @global array $cfg['SQLQuery']
|
||||
*/
|
||||
$cfg['SQLQuery'] = array();
|
||||
@ -2593,7 +2598,7 @@ $cfg['SaveDir'] = '';
|
||||
$cfg['TempDir'] = '';
|
||||
|
||||
|
||||
/**
|
||||
/*******************************************************************************
|
||||
* Misc. settings
|
||||
*/
|
||||
|
||||
@ -2635,7 +2640,12 @@ $cfg['LinkLengthLimit'] = 2000;
|
||||
*/
|
||||
$cfg['DisableMultiTableMaintenance'] = false;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* SQL Parser
|
||||
*/
|
||||
|
||||
/**
|
||||
* SQL Parser Settings
|
||||
*
|
||||
* @global array $cfg['SQP']
|
||||
@ -2665,6 +2675,10 @@ $cfg['SQP']['fmtIndUnit'] = 'em';
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* SQL Validator
|
||||
*/
|
||||
|
||||
/**
|
||||
* If you wish to use the SQL Validator service, you should be aware of the
|
||||
* following:
|
||||
* All SQL statements are stored anonymously for statistical purposes.
|
||||
@ -2699,6 +2713,10 @@ $cfg['SQLValidator']['password'] = '';
|
||||
|
||||
/*******************************************************************************
|
||||
* Developers ONLY!
|
||||
*/
|
||||
|
||||
/**
|
||||
* Debugging settings
|
||||
*
|
||||
* @global array $cfg['DBG']
|
||||
*/
|
||||
@ -2824,14 +2842,19 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'CHAR',
|
||||
'CHAR_LENGTH',
|
||||
'COMPRESS',
|
||||
'CONNECTION_ID',
|
||||
'COS',
|
||||
'COT',
|
||||
'CRC32',
|
||||
'CURDATE',
|
||||
'CURRENT_USER',
|
||||
'CURTIME',
|
||||
'DATABASE',
|
||||
'DATE',
|
||||
'DAYNAME',
|
||||
'DAYOFMONTH',
|
||||
'DAYOFWEEK',
|
||||
'DAYOFYEAR',
|
||||
'DEGREES',
|
||||
'DES_DECRYPT',
|
||||
'DES_ENCRYPT',
|
||||
@ -2841,35 +2864,53 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'FROM_DAYS',
|
||||
'FROM_UNIXTIME',
|
||||
'HEX',
|
||||
'HOUR',
|
||||
'INET_ATON',
|
||||
'INET_NTOA',
|
||||
'LAST_DAY',
|
||||
'LENGTH',
|
||||
'LN',
|
||||
'LOAD_FILE',
|
||||
'LOG',
|
||||
'LOG10',
|
||||
'LOG2',
|
||||
'LOWER',
|
||||
'LTRIM',
|
||||
'MD5',
|
||||
'MICROSECOND',
|
||||
'MINUTE',
|
||||
'MONTH',
|
||||
'MONTHNAME',
|
||||
'NOW',
|
||||
'OCT',
|
||||
'OLD_PASSWORD',
|
||||
'ORD',
|
||||
'PASSWORD',
|
||||
'PI',
|
||||
'QUARTER',
|
||||
'QUOTE',
|
||||
'RADIANS',
|
||||
'RAND',
|
||||
'REVERSE',
|
||||
'ROUND',
|
||||
'RTRIM',
|
||||
'SECOND',
|
||||
'SEC_TO_TIME',
|
||||
'SHA1',
|
||||
'SIGN',
|
||||
'SIN',
|
||||
'SOUNDEX',
|
||||
'SPACE',
|
||||
'SQRT',
|
||||
'STDDEV_POP',
|
||||
'STDDEV_SAMP',
|
||||
'SYSDATE',
|
||||
'TAN',
|
||||
'TIME',
|
||||
'TIMESTAMP',
|
||||
'TIME_TO_SEC',
|
||||
'TO_DAYS',
|
||||
'TRIM',
|
||||
'UNCOMPRESS',
|
||||
'UNCOMPRESSED_LENGTH',
|
||||
'UNHEX',
|
||||
'UNIX_TIMESTAMP',
|
||||
'UPPER',
|
||||
@ -2878,9 +2919,12 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'UTC_TIME',
|
||||
'UTC_TIMESTAMP',
|
||||
'UUID',
|
||||
'VAR_POP',
|
||||
'VAR_SAMP',
|
||||
'VERSION',
|
||||
'WEEK',
|
||||
'WEEKDAY',
|
||||
'WEEKOFYEAR',
|
||||
'YEAR',
|
||||
'YEARWEEK',
|
||||
);
|
||||
|
||||
/**
|
||||
@ -2908,29 +2952,29 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'TIME' => 'FUNC_DATE',
|
||||
'YEAR' => 'FUNC_DATE',
|
||||
|
||||
'CHAR' => 'FUNC_CHAR',
|
||||
'VARCHAR' => 'FUNC_CHAR',
|
||||
'TINYTEXT' => 'FUNC_CHAR',
|
||||
'TEXT' => 'FUNC_CHAR',
|
||||
'MEDIUMTEXT' => 'FUNC_CHAR',
|
||||
'LONGTEXT' => 'FUNC_CHAR',
|
||||
'BINARY' => 'FUNC_CHAR',
|
||||
'VARBINARY' => 'FUNC_CHAR',
|
||||
'TINYBLOB' => 'FUNC_CHAR',
|
||||
'MEDIUMBLOB' => 'FUNC_CHAR',
|
||||
'BLOB' => 'FUNC_CHAR',
|
||||
'LONGBLOB' => 'FUNC_CHAR',
|
||||
'ENUM' => '',
|
||||
'SET' => '',
|
||||
'CHAR' => 'FUNC_CHAR',
|
||||
'VARCHAR' => 'FUNC_CHAR',
|
||||
'TINYTEXT' => 'FUNC_CHAR',
|
||||
'TEXT' => 'FUNC_CHAR',
|
||||
'MEDIUMTEXT' => 'FUNC_CHAR',
|
||||
'LONGTEXT' => 'FUNC_CHAR',
|
||||
'BINARY' => 'FUNC_CHAR',
|
||||
'VARBINARY' => 'FUNC_CHAR',
|
||||
'TINYBLOB' => 'FUNC_CHAR',
|
||||
'MEDIUMBLOB' => 'FUNC_CHAR',
|
||||
'BLOB' => 'FUNC_CHAR',
|
||||
'LONGBLOB' => 'FUNC_CHAR',
|
||||
'ENUM' => '',
|
||||
'SET' => '',
|
||||
|
||||
'GEOMETRY' => 'FUNC_SPATIAL',
|
||||
'POINT' => 'FUNC_SPATIAL',
|
||||
'LINESTRING' => 'FUNC_SPATIAL',
|
||||
'POLYGON' => 'FUNC_SPATIAL',
|
||||
'MULTIPOINT' => 'FUNC_SPATIAL',
|
||||
'MULTILINESTRING' => 'FUNC_SPATIAL',
|
||||
'MULTIPOLYGON' => 'FUNC_SPATIAL',
|
||||
'GEOMETRYCOLLECTION' => 'FUNC_SPATIAL',
|
||||
'GEOMETRY' => 'FUNC_SPATIAL',
|
||||
'POINT' => 'FUNC_SPATIAL',
|
||||
'LINESTRING' => 'FUNC_SPATIAL',
|
||||
'POLYGON' => 'FUNC_SPATIAL',
|
||||
'MULTIPOINT' => 'FUNC_SPATIAL',
|
||||
'MULTILINESTRING' => 'FUNC_SPATIAL',
|
||||
'MULTIPOLYGON' => 'FUNC_SPATIAL',
|
||||
'GEOMETRYCOLLECTION' => 'FUNC_SPATIAL',
|
||||
|
||||
);
|
||||
|
||||
@ -2945,20 +2989,27 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'CHAR',
|
||||
'CURRENT_USER',
|
||||
'COMPRESS',
|
||||
'DATABASE',
|
||||
'DAYNAME',
|
||||
'DES_DECRYPT',
|
||||
'DES_ENCRYPT',
|
||||
'ENCRYPT',
|
||||
'HEX',
|
||||
'INET_NTOA',
|
||||
'LOAD_FILE',
|
||||
'LOWER',
|
||||
'LTRIM',
|
||||
'MD5',
|
||||
'MONTHNAME',
|
||||
'OLD_PASSWORD',
|
||||
'PASSWORD',
|
||||
'QUOTE',
|
||||
'REVERSE',
|
||||
'RTRIM',
|
||||
'SHA1',
|
||||
'SOUNDEX',
|
||||
'SPACE',
|
||||
'TRIM',
|
||||
'UNCOMPRESS',
|
||||
'UNHEX',
|
||||
'UPPER',
|
||||
@ -2972,8 +3023,11 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'DATE',
|
||||
'FROM_DAYS',
|
||||
'FROM_UNIXTIME',
|
||||
'LAST_DAY',
|
||||
'NOW',
|
||||
'SEC_TO_TIME',
|
||||
'SYSDATE',
|
||||
'TIME',
|
||||
'TIMESTAMP',
|
||||
'UTC_DATE',
|
||||
'UTC_TIME',
|
||||
@ -2991,31 +3045,46 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'BIT_COUNT',
|
||||
'CEILING',
|
||||
'CHAR_LENGTH',
|
||||
'CONNECTION_ID',
|
||||
'COS',
|
||||
'COT',
|
||||
'CRC32',
|
||||
'DAYOFMONTH',
|
||||
'DAYOFWEEK',
|
||||
'DAYOFYEAR',
|
||||
'DEGREES',
|
||||
'EXP',
|
||||
'FLOOR',
|
||||
'HOUR',
|
||||
'INET_ATON',
|
||||
'LENGTH',
|
||||
'LN',
|
||||
'LOG',
|
||||
'LOG2',
|
||||
'LOG10',
|
||||
'MICROSECOND',
|
||||
'MINUTE',
|
||||
'MONTH',
|
||||
'OCT',
|
||||
'ORD',
|
||||
'PI',
|
||||
'QUARTER',
|
||||
'RADIANS',
|
||||
'RAND',
|
||||
'ROUND',
|
||||
'SECOND',
|
||||
'SIGN',
|
||||
'SIN',
|
||||
'SQRT',
|
||||
'STDDEV_POP',
|
||||
'STDDEV_SAMP',
|
||||
'TAN',
|
||||
'TO_DAYS',
|
||||
'TIME_TO_SEC',
|
||||
'UNCOMPRESSED_LENGTH',
|
||||
'UNIX_TIMESTAMP',
|
||||
'VAR_POP',
|
||||
'VAR_SAMP',
|
||||
'WEEK',
|
||||
'WEEKDAY',
|
||||
'WEEKOFYEAR',
|
||||
'YEARWEEK',
|
||||
),
|
||||
|
||||
'FUNC_SPATIAL' => array(
|
||||
@ -3052,8 +3121,6 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'first_timestamp' => 'NOW',
|
||||
'pk_char36' => 'UUID',
|
||||
);
|
||||
|
||||
|
||||
} // end if
|
||||
|
||||
/**
|
||||
|
||||
@ -836,86 +836,13 @@ function PMA_DBI_get_columns($database, $table, $full = false, $link = null)
|
||||
$fields = PMA_DBI_fetch_result(
|
||||
'SHOW ' . ($full ? 'FULL' : '') . ' COLUMNS
|
||||
FROM ' . PMA_backquote($database) . '.' . PMA_backquote($table),
|
||||
'Field', ($full ? null : 'Field'), $link);
|
||||
'Field', null, $link);
|
||||
if (! is_array($fields) || count($fields) < 1) {
|
||||
return false;
|
||||
}
|
||||
return $fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* array PMA_DBI_get_column_values (string $database, string $table, string $column , mysql db link $link = null)
|
||||
*
|
||||
* @param string $database name of database
|
||||
* @param string $table name of table to retrieve columns from
|
||||
* @param string $column name of the column to retrieve data from
|
||||
* @param mixed $link mysql link resource
|
||||
* @return array $field_values
|
||||
*/
|
||||
|
||||
function PMA_DBI_get_column_values($database, $table, $column, $link = null)
|
||||
{
|
||||
$query = 'SELECT ';
|
||||
for($i=0; $i< sizeof($column); $i++)
|
||||
{
|
||||
$query.= PMA_backquote($column[$i]);
|
||||
if($i < (sizeof($column)-1))
|
||||
{
|
||||
$query.= ', ';
|
||||
}
|
||||
}
|
||||
$query.= ' FROM ' . PMA_backquote($database) . '.' . PMA_backquote($table);
|
||||
$field_values = PMA_DBI_fetch_result($query, null, null, $link);
|
||||
|
||||
if (! is_array($field_values) || count($field_values) < 1) {
|
||||
return false;
|
||||
}
|
||||
return $field_values;
|
||||
}
|
||||
/**
|
||||
* array PMA_DBI_get_table_data (string $database, string $table, mysql db link $link = null)
|
||||
*
|
||||
* @param string $database name of database
|
||||
* @param string $table name of table to retrieve columns from
|
||||
* @param mixed $link mysql link resource
|
||||
* @return array $result
|
||||
*/
|
||||
|
||||
function PMA_DBI_get_table_data($database, $table, $link = null)
|
||||
{
|
||||
|
||||
$result = PMA_DBI_fetch_result(
|
||||
'SELECT * FROM ' . PMA_backquote($database) . '.' . PMA_backquote($table),
|
||||
null,null, $link);
|
||||
|
||||
if (! is_array($result) || count($result) < 1) {
|
||||
return false;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* array PMA_DBI_get_table_indexes($database, $table, $link = null)
|
||||
*
|
||||
* @param string $database name of database
|
||||
* @param string $table name of the table whose indexes are to be retreived
|
||||
* @param mixed $link mysql link resource
|
||||
* @return array $indexes
|
||||
*/
|
||||
|
||||
function PMA_DBI_get_table_indexes($database, $table, $link = null)
|
||||
{
|
||||
|
||||
$indexes = PMA_DBI_fetch_result(
|
||||
'SHOW INDEXES FROM ' .PMA_backquote($database) . '.' . PMA_backquote($table),
|
||||
null, null, $link);
|
||||
|
||||
if (! is_array($indexes) || count($indexes) < 1) {
|
||||
return false;
|
||||
}
|
||||
return $indexes;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns value of given mysql server variable
|
||||
*
|
||||
|
||||
@ -35,13 +35,6 @@ if (empty($export_list)) {
|
||||
PMA_Message::error( __('Could not load export plugins, please check your installation!'))->display();
|
||||
require './libraries/footer.inc.php';
|
||||
}
|
||||
|
||||
// If the form data is being loaded from GET data, decode it
|
||||
foreach($_GET as $name => $value) {
|
||||
if(is_string($value)) {
|
||||
$_GET[urldecode($name)] = urldecode($value);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<form method="post" action="export.php" name="dump">
|
||||
@ -73,7 +66,7 @@ echo '<input type="hidden" name="export_method" value="' . htmlspecialchars($cfg
|
||||
|
||||
|
||||
if(isset($_GET['sql_query'])) {
|
||||
echo '<input type="hidden" name="sql_query" value="' . htmlspecialchars(urldecode($_GET['sql_query'])) . '" />' . "\n";
|
||||
echo '<input type="hidden" name="sql_query" value="' . htmlspecialchars($_GET['sql_query']) . '" />' . "\n";
|
||||
} elseif (! empty($sql_query)) {
|
||||
echo '<input type="hidden" name="sql_query" value="' . htmlspecialchars($sql_query) . '" />' . "\n";
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ function PMA_dataDiffInTables($src_db, $trg_db, $src_link, $trg_link, &$matching
|
||||
$fields_num[$matching_table_index] = sizeof($fld);
|
||||
$matching_tables_keys[$matching_table_index] = $is_key;
|
||||
|
||||
$source_result_set = PMA_DBI_get_column_values($src_db, $matching_table[$matching_table_index], $is_key, $src_link);
|
||||
$source_result_set = PMA_get_column_values($src_db, $matching_table[$matching_table_index], $is_key, $src_link);
|
||||
$source_size = sizeof($source_result_set);
|
||||
|
||||
$trg_fld_results = PMA_DBI_get_columns($trg_db, $matching_table[$matching_table_index], true, $trg_link);
|
||||
@ -309,11 +309,11 @@ function PMA_dataDiffInTables($src_db, $trg_db, $src_link, $trg_link, &$matching
|
||||
function PMA_findDeleteRowsFromTargetTables(&$delete_array, $matching_table, $matching_table_index, $trg_keys, $src_keys, $trg_db, $trg_link,$src_db, $src_link)
|
||||
{
|
||||
if (isset($trg_keys[$matching_table_index])) {
|
||||
$target_key_values = PMA_DBI_get_column_values($trg_db, $matching_table[$matching_table_index], $trg_keys[$matching_table_index], $trg_link);
|
||||
$target_key_values = PMA_get_column_values($trg_db, $matching_table[$matching_table_index], $trg_keys[$matching_table_index], $trg_link);
|
||||
$target_row_size = sizeof($target_key_values);
|
||||
}
|
||||
if (isset($src_keys[$matching_table_index])) {
|
||||
$source_key_values = PMA_DBI_get_column_values($src_db, $matching_table[$matching_table_index], $src_keys[$matching_table_index], $src_link);
|
||||
$source_key_values = PMA_get_column_values($src_db, $matching_table[$matching_table_index], $src_keys[$matching_table_index], $src_link);
|
||||
$source_size = sizeof($source_key_values);
|
||||
}
|
||||
$all_keys_match = 1;
|
||||
@ -1115,7 +1115,7 @@ function PMA_removeColumnsFromTargetTable($trg_db, $trg_link, $matching_tables,
|
||||
* indexes to be altered in $alter_indexes_array and indexes to be removed from target table in $remove_indexes_array.
|
||||
* Only keyname and uniqueness characteristic of the indexes are altered.
|
||||
* @uses sizeof()
|
||||
* @uses PMA_DBI_get_table_indexes()
|
||||
* @uses PMA_get_table_indexes()
|
||||
*
|
||||
* @param $src_db name of source database
|
||||
* @param $trg_db name of target database
|
||||
@ -1133,8 +1133,8 @@ function PMA_indexesDiffInTables($src_db, $trg_db, $src_link, $trg_link, $matchi
|
||||
&$alter_indexes_array, &$remove_indexes_array, $table_counter)
|
||||
{
|
||||
//Gets indexes information for source and target table
|
||||
$source_indexes[$table_counter] = PMA_DBI_get_table_indexes($src_db, $matching_tables[$table_counter],$src_link);
|
||||
$target_indexes[$table_counter] = PMA_DBI_get_table_indexes($trg_db, $matching_tables[$table_counter],$trg_link);
|
||||
$source_indexes[$table_counter] = PMA_get_table_indexes($src_db, $matching_tables[$table_counter],$src_link);
|
||||
$target_indexes[$table_counter] = PMA_get_table_indexes($trg_db, $matching_tables[$table_counter],$trg_link);
|
||||
for ($a = 0; $a < sizeof($source_indexes[$table_counter]); $a++) {
|
||||
$found = false;
|
||||
$z = 0;
|
||||
@ -1338,4 +1338,56 @@ function PMA_syncDisplayBeginTableRow($odd_row) {
|
||||
echo '">';
|
||||
return $odd_row;
|
||||
}
|
||||
|
||||
/**
|
||||
* array PMA_get_column_values (string $database, string $table, string $column , mysql db link $link = null)
|
||||
*
|
||||
* @param string $database name of database
|
||||
* @param string $table name of table to retrieve columns from
|
||||
* @param string $column name of the column to retrieve data from
|
||||
* @param mixed $link mysql link resource
|
||||
* @return array $field_values
|
||||
*/
|
||||
|
||||
function PMA_get_column_values($database, $table, $column, $link = null)
|
||||
{
|
||||
$query = 'SELECT ';
|
||||
for($i=0; $i< sizeof($column); $i++)
|
||||
{
|
||||
$query.= PMA_backquote($column[$i]);
|
||||
if($i < (sizeof($column)-1))
|
||||
{
|
||||
$query.= ', ';
|
||||
}
|
||||
}
|
||||
$query.= ' FROM ' . PMA_backquote($database) . '.' . PMA_backquote($table);
|
||||
$field_values = PMA_DBI_fetch_result($query, null, null, $link);
|
||||
|
||||
if (! is_array($field_values) || count($field_values) < 1) {
|
||||
return false;
|
||||
}
|
||||
return $field_values;
|
||||
}
|
||||
|
||||
/**
|
||||
* array PMA_get_table_indexes($database, $table, $link = null)
|
||||
*
|
||||
* @param string $database name of database
|
||||
* @param string $table name of the table whose indexes are to be retreived
|
||||
* @param mixed $link mysql link resource
|
||||
* @return array $indexes
|
||||
*/
|
||||
|
||||
function PMA_get_table_indexes($database, $table, $link = null)
|
||||
{
|
||||
|
||||
$indexes = PMA_DBI_fetch_result(
|
||||
'SHOW INDEXES FROM ' .PMA_backquote($database) . '.' . PMA_backquote($table),
|
||||
null, null, $link);
|
||||
|
||||
if (! is_array($indexes) || count($indexes) < 1) {
|
||||
return false;
|
||||
}
|
||||
return $indexes;
|
||||
}
|
||||
?>
|
||||
|
||||
@ -130,18 +130,27 @@ if (isset($_REQUEST['where_clause'])) {
|
||||
$query = array();
|
||||
$value_sets = array();
|
||||
$func_no_param = array(
|
||||
'NOW',
|
||||
'CONNECTION_ID',
|
||||
'CURRENT_USER',
|
||||
'CURDATE',
|
||||
'CURTIME',
|
||||
'DATABASE',
|
||||
'LAST_INSERT_ID',
|
||||
'NOW',
|
||||
'PI',
|
||||
'RAND',
|
||||
'SYSDATE',
|
||||
'UNIX_TIMESTAMP',
|
||||
'USER',
|
||||
'UTC_DATE',
|
||||
'UTC_TIME',
|
||||
'UTC_TIMESTAMP',
|
||||
'UNIX_TIMESTAMP',
|
||||
'RAND',
|
||||
'USER',
|
||||
'LAST_INSERT_ID',
|
||||
'UUID',
|
||||
'CURRENT_USER',
|
||||
'VERSION',
|
||||
);
|
||||
$func_optional_param = array(
|
||||
'RAND',
|
||||
'UNIX_TIMESTAMP',
|
||||
);
|
||||
|
||||
foreach ($loop_array as $rownumber => $where_clause) {
|
||||
@ -225,16 +234,15 @@ foreach ($loop_array as $rownumber => $where_clause) {
|
||||
|
||||
if (empty($me_funcs[$key])) {
|
||||
$cur_value = $val;
|
||||
} elseif ('UNIX_TIMESTAMP' === $me_funcs[$key] && $val != "''") {
|
||||
$cur_value = $me_funcs[$key] . '(' . $val . ')';
|
||||
} elseif ('UUID' === $me_funcs[$key]) {
|
||||
/* This way user will know what UUID new row has */
|
||||
$uuid = PMA_DBI_fetch_value('SELECT UUID()');
|
||||
$cur_value = "'" . $uuid . "'";
|
||||
} elseif (in_array($me_funcs[$key], $func_no_param)) {
|
||||
$cur_value = $me_funcs[$key] . '()';
|
||||
} else {
|
||||
} elseif (!in_array($me_funcs[$key], $func_no_param)
|
||||
|| ($val != "''" && in_array($me_funcs[$key], $func_optional_param))) {
|
||||
$cur_value = $me_funcs[$key] . '(' . $val . ')';
|
||||
} else {
|
||||
$cur_value = $me_funcs[$key] . '()';
|
||||
}
|
||||
|
||||
// i n s e r t
|
||||
|
||||
@ -1729,7 +1729,7 @@ table#serverconnection_trg_local {
|
||||
*/
|
||||
input[type=text].invalid_value,
|
||||
.invalid_value {
|
||||
background:#F00;
|
||||
background:#FFCCCC;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user