Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyron Madlener <tyronx@gmail.com>2011-06-19 22:43:02 +0400
committerTyron Madlener <tyronx@gmail.com>2011-06-19 22:43:02 +0400
commitaa7704b067f390a8a5efd281ba4f12447bb5d3e6 (patch)
tree98f2c9b75d7935c58c42abe8052276b33bdb0b56 /server_variables.php
parent4ee08ac03d5cb054b462ee080bc81790bd5e2f77 (diff)
global vars: mysql wants numeric datatype for numeric values
Diffstat (limited to 'server_variables.php')
-rw-r--r--server_variables.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/server_variables.php b/server_variables.php
index 273d07a997..d269852b8a 100644
--- a/server_variables.php
+++ b/server_variables.php
@@ -41,7 +41,10 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) {
exit($varValue[1]);
break;
case 'setval':
- if(PMA_DBI_query('SET GLOBAL '.$_REQUEST['varName'].' = \''.$_REQUEST['varValue'].'\''))
+ $value = $_REQUEST['varValue'];
+ if(!is_numeric($value)) $value="'".$value."'";
+
+ if(PMA_DBI_query('SET GLOBAL '.$_REQUEST['varName'].' = '.$value))
// Some values are rounded down etc.
$varValue = PMA_DBI_fetch_single_row('SHOW GLOBAL VARIABLES WHERE Variable_name="'.$_REQUEST['varName'].'";','NUM');