From 605650e11e2799b658ff08173c610a8e240d6b08 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Wed, 11 Apr 2012 22:56:56 +0530 Subject: [PATCH] bug #3516761 [edit] Query error after search --- ChangeLog | 1 + js/sql.js | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 61c1fa8a11..2dfaac55fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ phpMyAdmin - ChangeLog - bug #3516037 [auth] JS includes missing in auth config error page - bug #3516183 [display] Missing image extension - bug [display] Added missing icons in original theme +- bug #3516761 [edit] Query error after search 3.5.0.0 (2012-04-07) + rfe #2021981 [interface] Add support for mass prefix change. diff --git a/js/sql.js b/js/sql.js index 6f00c75b0b..13703ca8cb 100644 --- a/js/sql.js +++ b/js/sql.js @@ -43,7 +43,12 @@ function getFieldName($this_field) var field_name = $('#table_results').find('thead').find('th:eq('+ (this_field_index - left_action_skip) + ') a').text(); // happens when just one row (headings contain no a) if ("" == field_name) { - field_name = $('#table_results').find('thead').find('th:eq('+ (this_field_index - left_action_skip) + ')').text(); + var $heading = $('#table_results').find('thead').find('th:eq('+ (this_field_index - left_action_skip) + ')').children('span'); + // may contain column comment enclosed in a span - detach it temporarily to read the column name + var $tempColComment = $heading.children().detach(); + field_name = $heading.text(); + // re-attach the column comment + $heading.append($tempColComment); } field_name = $.trim(field_name);