From 650dfe952696994c717b76f8a2f83053d724e897 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 12 Dec 2014 14:54:47 +0100 Subject: [PATCH] Patch for an Issue #1018 --- lib/techniques/error/use.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/techniques/error/use.py b/lib/techniques/error/use.py index 37630b04b..9eb42d063 100644 --- a/lib/techniques/error/use.py +++ b/lib/techniques/error/use.py @@ -281,7 +281,7 @@ def errorUse(expression, dump=False): # Count the number of SQL query entries output countedExpression = expression.replace(expressionFields, queries[Backend.getIdentifiedDbms()].count.query % ('*' if len(expressionFieldsList) > 1 else expressionFields), 1) - if " ORDER BY " in expression.upper(): + if " ORDER BY " in countedExpression.upper(): _ = countedExpression.upper().rindex(" ORDER BY ") countedExpression = countedExpression[:_]