summaryrefslogtreecommitdiff
path: root/httemplate/search/sql.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-07-26 15:41:26 -0700
committerIvan Kohler <ivan@freeside.biz>2015-07-26 15:41:26 -0700
commit9aee669886202be7035e6c6049fc71bc99dd3013 (patch)
tree2fd5bf6de74f3d99270587ffb1833e4188a6373d /httemplate/search/sql.html
parentac20214d38d9af00430423f147b5a0e50751b050 (diff)
parent1add633372bdca3cc7163c2ce48363fed3984437 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
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>