patch for bug-3017

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
This commit is contained in:
Mason James 2009-03-09 15:13:06 +13:00 committed by Henri-Damien LAURENT
parent 24c155aab9
commit f6a17a30fb
1 changed files with 1 additions and 1 deletions

View File

@ -483,7 +483,7 @@ Given some sql and a name this will saved it so that it can resued
sub save_report {
my ( $sql, $name, $type, $notes ) = @_;
my $dbh = C4::Context->dbh();
$sql =~ s/(\W*)$//;
$sql =~ s/(\s*\;\s*)$//; # removes trailing whitespace and /;/
my $query =
"INSERT INTO saved_sql (borrowernumber,date_created,last_modified,savedsql,report_name,type,notes) VALUES (?,now(),now(),?,?,?,?)";
my $sth = $dbh->prepare($query);