From 75afe56902c7f00192d9f002e10c7803a27cc7ca Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Wed, 4 Aug 2010 12:49:35 +0100 Subject: [PATCH] Bug 5086 Pass claimed date correctly Content-Type: text/plain; charset="utf-8" Claim date is being interpolated into sql string but without the necessary quotes resulting in a date of 0 being set. interpolation into sql strings should be avoided --- C4/Serials.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 032246c..8779433 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -287,7 +287,7 @@ sub UpdateClaimdateIssues { my $dbh = C4::Context->dbh; $date = strftime( "%Y-%m-%d", localtime ) unless ($date); my $query = " - UPDATE serial SET claimdate=$date,status=7 + UPDATE serial SET claimdate=\'$date\',status=7 WHERE serialid in (" . join( ",", @$serialids ) . ")"; my $rq = $dbh->prepare($query); $rq->execute; -- 1.7.2