diff options
| author | Jonathan Prykop <jonathan@freeside.biz> | 2015-07-02 13:17:00 -0500 |
|---|---|---|
| committer | Jonathan Prykop <jonathan@freeside.biz> | 2015-07-02 13:17:00 -0500 |
| commit | 379c06ccd4b984bfa8130d98f862799239a8d00c (patch) | |
| tree | e505a4e60c018ea146b997ddfe745711bd0081f8 /httemplate/search/sql.html | |
| parent | 0b9c15a3add1d3715c3895171894ac6480d1dfc1 (diff) | |
| parent | 838897525d851ea5cb1386c253471a02a3f41b5f (diff) | |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
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> |
