diff --git a/src/DebugBar/Resources/widgets/sqlqueries/widget.js b/src/DebugBar/Resources/widgets/sqlqueries/widget.js index 843553c..dea781f 100644 --- a/src/DebugBar/Resources/widgets/sqlqueries/widget.js +++ b/src/DebugBar/Resources/widgets/sqlqueries/widget.js @@ -40,10 +40,7 @@ if (stmt.memory_str) { $('').addClass(csscls('memory')).text(stmt.memory_str).appendTo(li); } - if (typeof(stmt.is_success) != 'undefined' && !stmt.is_success) { - li.addClass(csscls('error')); - li.append($('').addClass(csscls('error')).text("[" + stmt.error_code + "] " + stmt.error_message)); - } else if (typeof(stmt.row_count) != 'undefined') { + if (typeof(stmt.row_count) != 'undefined') { $('').addClass(csscls('row-count')).text(stmt.row_count).appendTo(li); } if (typeof(stmt.stmt_id) != 'undefined' && stmt.stmt_id) { @@ -66,6 +63,10 @@ } } } + if (typeof(stmt.is_success) != 'undefined' && !stmt.is_success) { + li.addClass(csscls('error')); + li.append($('').addClass(csscls('error')).text("[" + stmt.error_code + "] " + stmt.error_message)); + } if (stmt.params && !$.isEmptyObject(stmt.params)) { var table = $('
Params
').addClass(csscls('params')).appendTo(li); for (var key in stmt.params) {