[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_0BETA3-806-g2a754b2

The branch, master has been updated via 2a754b25e44212a9d3cca035f29c86705ac8c2da (commit) from 82a1d451d1fad0164b4efde5b89a7f4f989b18ba (commit) - Log ----------------------------------------------------------------- commit 2a754b25e44212a9d3cca035f29c86705ac8c2da Author: Madhura Jayaratne <madhura.cj@gmail.com> Date: Fri Feb 18 07:35:12 2011 +0530 Bug #3184827 Inline edit fails on some tables ----------------------------------------------------------------------- Summary of changes: js/sql.js | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/js/sql.js b/js/sql.js index d286348..fd38843 100644 --- a/js/sql.js +++ b/js/sql.js @@ -643,12 +643,16 @@ $(document).ready(function() { */ var sql_query = 'UPDATE ' + window.parent.table + ' SET '; - $.each(params_to_submit, function(key, value) { - if(value.length == 0) { - value = 'NULL' - } - sql_query += ' ' + key + "='" + value.replace(/'/g, "''") + "' , "; - }) + // $.each() not used here since it cause problems when there is a column + // in the table with the name 'length'. See bug #3184827 + var value; + for (var key in params_to_submit) { + value = params_to_submit[key]; + if (value.length == 0) { + value = 'NULL'; + } + sql_query += ' ' + key + "='" + value.replace(/'/g, "''") + "' , "; + } //Remove the last ',' appended in the above loop sql_query = sql_query.replace(/,\s$/, ''); sql_query += ' WHERE ' + PMA_urldecode(where_clause); hooks/post-receive -- phpMyAdmin
participants (1)
-
Madhura Jayaratne