diff options
| author | Mark Wells <mark@freeside.biz> | 2015-07-01 16:54:00 -0700 |
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2015-07-01 16:54:00 -0700 |
| commit | 5fa112d129fa6866703c52c4fdbe0076d80efdf0 (patch) | |
| tree | ab7664c66d4ba07042a80300f37fc99228a4a367 /httemplate/search/sql.html | |
| parent | d1cdae31052a590b270145b34e57aa0156e73ea2 (diff) | |
ensure all reports work correctly after #25994 changes
Diffstat (limited to 'httemplate/search/sql.html')
| -rw-r--r-- | httemplate/search/sql.html | 5 |
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> |
