fix SQL Reports using statements other than select
This commit is contained in:
parent
0da36cc64b
commit
42586252e5
2 changed files with 5 additions and 4 deletions
|
|
@ -2,6 +2,7 @@
|
|||
- fix: Apostrophy incorrectly escaped as double quote in some places
|
||||
- Remove Help TOC links
|
||||
- Fix hover help for collaboration system rich editor
|
||||
- Fix using statements other than SELECT in SQL Reports
|
||||
|
||||
7.4.4
|
||||
- fix: Changing group detail adds number to group name
|
||||
|
|
|
|||
|
|
@ -690,10 +690,10 @@ sub setDataByQuery {
|
|||
#Calculate where to start
|
||||
my $start = ( ($pageNumber - 1) * $rowsPerPage );
|
||||
|
||||
#Set the query limits
|
||||
$sql =~ s/;\s+$//;
|
||||
$sql .= " limit $start,$rowsPerPage";
|
||||
$sql =~ s/\bSELECT\s/SELECT SQL_CALC_FOUND_ROWS /i;
|
||||
#Set the query limits, but only for select queries
|
||||
if ($sql =~ s/^\s*SELECT\s/SELECT SQL_CALC_FOUND_ROWS /i) {
|
||||
$sql =~ s/;?\s*$/ LIMIT $start,$rowsPerPage/;
|
||||
}
|
||||
|
||||
#$self->session->errorHandler->warn($sql);
|
||||
#Get only the data necessary from the database
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue