summaryrefslogtreecommitdiff
path: root/httemplate/search/sql.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-07-01 16:54:00 -0700
committerMark Wells <mark@freeside.biz>2015-07-01 17:02:06 -0700
commite5f71fca0f00992f80b3081844714d95eda3a295 (patch)
treea7503885012b9497c5f3a2e148a8aba39b58775b /httemplate/search/sql.html
parentae5415f618e3bb43715dee4334701f6254cb1893 (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>