diff --git a/js/sql.js b/js/sql.js index 997db4925..1684b3019 100644 --- a/js/sql.js +++ b/js/sql.js @@ -203,7 +203,7 @@ $(document).ready(function() { // In each input sibling, wrap the current value in a textarea // and store the current value in a hidden span - if($(this).is(':not(.truncated, .transformed, .relation, .enum)')) { + if($(this).is(':not(.truncated, .transformed, .relation, .enum, .null)')) { // handle non-truncated, non-transformed, non-relation values // We don't need to get any more data, just wrap the value $(this).html('') @@ -274,6 +274,12 @@ $(document).ready(function() { $(".original_data").hide(); }) } + else if($(this).is('.null')) { + //handle null fields + $(this_field).html('') + .append('NULL'); + $(".original_data").hide(); + } }) }) // End On click, replace the current field with an input/textarea @@ -339,7 +345,10 @@ $(document).ready(function() { var sql_query = 'UPDATE ' + window.parent.table + ' SET '; $.each(params_to_submit, function(key, value) { - sql_query += ' ' + key + "='" + value + "' , "; + if(value.length == 0) { + value = 'NULL' + } + sql_query += ' ' + key + "='" + value + "' , "; }) sql_query = sql_query.replace(/,\s$/, ''); sql_query += ' WHERE ' + where_clause; diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 41d2a380d..a7af2c105 100755 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -1031,6 +1031,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { $vertical_display['delete'] = array(); $vertical_display['data'] = array(); $vertical_display['row_delete'] = array(); + $data_inline_edit_class = 'data_inline_edit'; // Correction University of Virginia 19991216 in the while below // Previous code assumed that all tables have keys, specifically that @@ -1074,7 +1075,10 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { // pointer code part echo '