summaryrefslogtreecommitdiff
path: root/httemplate/search/sql.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-07-01 19:18:56 -0400
committerMark Wells <mark@freeside.biz>2015-07-01 19:22:57 -0400
commit2f598fd16823ad9ed461993840428e693e22c5fb (patch)
treebbd1d2fbbbb0f31c8152f72b784241165f8672e1 /httemplate/search/sql.html
parenta931e7703fc3b7b68a1e17c11cc9c76949372898 (diff)
ensure all reports work correctly after #25994 changes
Diffstat (limited to 'httemplate/search/sql.html')
-rw-r--r--httemplate/search/sql.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/httemplate/search/sql.html b/httemplate/search/sql.html
index 71aa00671..54d6c2d79 100644
--- a/httemplate/search/sql.html
+++ b/httemplate/search/sql.html
@@ -2,7 +2,7 @@
'title' => 'Query Results',
'name' => 'rows',
'query' => "SELECT $sql",
-
+ 'count_query' => $count,
&>
<%init>
@@ -12,4 +12,7 @@ die "access denied"
my $sql = $cgi->param('sql') or errorpage('Empty query');
$sql =~ s/;+\s*$//; #remove trailing ;
+my $count = $sql;
+$count =~ s/.* FROM /SELECT COUNT(*) FROM /i;
+
</%init>