diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2015-08-07 22:01:31 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2015-08-07 22:01:31 -0700 |
| commit | 0c76afbb717e1716e6126bc4a120b8d9471614a0 (patch) | |
| tree | 9a398e455a7767372588077470685d25ef8d82b3 /httemplate/search/sql.html | |
| parent | 7beec7068e00be5ae1b2599fdf2b494bc19e31d0 (diff) | |
| parent | 3e2c2ad8aff1bd361ca07495b2255538c8231079 (diff) | |
Merge branch 'FREESIDE_3_BRANCH' of git.freeside.biz:/home/git/freeside into FREESIDE_3_BRANCH
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> |
