From cd3cd63d12bc83397ea18d72b84671e0ef50a94b Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 24 Aug 2007 07:22:45 +0000 Subject: [PATCH] fix SQL report pagination --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Paginator.pm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 8db98597d..5e85e7fc6 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -5,6 +5,7 @@ - fix: bug in poll where you can't edit it to have less answers - fix: CS post title form field sized too large - fix: asset manager doesn't obey ui levels + - fix: pagination broken on SQL Reports 7.4.3 - Data Forms set reply to to the same as the from field diff --git a/lib/WebGUI/Paginator.pm b/lib/WebGUI/Paginator.pm index 5f623d20e..4a58fba6a 100644 --- a/lib/WebGUI/Paginator.pm +++ b/lib/WebGUI/Paginator.pm @@ -693,7 +693,7 @@ sub setDataByQuery { #Set the query limits $sql =~ s/;\s+$//; $sql .= " limit $start,$rowsPerPage"; - $sql =~ s/select/select SQL_CALC_FOUND_ROWS /; + $sql =~ s/\bSELECT\s/SELECT SQL_CALC_FOUND_ROWS /i; #$self->session->errorHandler->warn($sql); #Get only the data necessary from the database