1 <& elements/search.html,
2 'title' => 'Query Results',
4 'query' => "SELECT $sql",
5 'count_query' => $count,
10 unless $FS::CurrentUser::CurrentUser->access_right('Raw SQL');
12 my $sql = $cgi->param('sql') or errorpage('Empty query');
13 $sql =~ s/;+\s*$//; #remove trailing ;
16 $count =~ s/.* FROM /SELECT COUNT(*) FROM /i;