From 7c0c9c7043d6d4010df9cc8d56e76eeef92d55bf Mon Sep 17 00:00:00 2001 From: Joshua Jabbour Date: Mon, 24 Mar 2014 23:43:50 -0700 Subject: [PATCH] Include params object when counting query duplicates. --- src/DebugBar/Resources/widgets/sqlqueries/widget.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/DebugBar/Resources/widgets/sqlqueries/widget.js b/src/DebugBar/Resources/widgets/sqlqueries/widget.js index 1c1222b..f849fee 100644 --- a/src/DebugBar/Resources/widgets/sqlqueries/widget.js +++ b/src/DebugBar/Resources/widgets/sqlqueries/widget.js @@ -56,6 +56,9 @@ // Search for duplicate statements. for (var sql = {}, duplicate = 0, i = 0; i < data.statements.length; i++) { var stmt = data.statements[i].sql; + if (data.statements[i].params && !$.isEmptyObject(data.statements[i].params)) { + stmt += ' {' + $.param(data.statements[i].params, false) + '}'; + } sql[stmt] = sql[stmt] || { keys: [] }; sql[stmt].keys.push(i); }