From 36b3d24bcd1c00bac9dc46ca2ad7b8c630f30116 Mon Sep 17 00:00:00 2001 From: kados Date: Mon, 3 Apr 2006 23:45:00 +0000 Subject: [PATCH] sync with head. --- C4/Members.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/C4/Members.pm b/C4/Members.pm index 21c0acb8b2..d30e75fec5 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -414,7 +414,11 @@ sub fixup_cardnumber ($) { $cardnumber="V$cardnumber$rem"; } else { - my $sth=$dbh->prepare("select max(borrowers.cardnumber) from borrowers"); + # MODIFIED BY JF: mysql4.1 allows casting as an integer, which is probably + # better. I'll leave the original in in case it needs to be changed for you + my $sth=$dbh->prepare("select max(cast(cardnumber as signed)) from borrowers"); + #my $sth=$dbh->prepare("select max(borrowers.cardnumber) from borrowers"); + $sth->execute; my ($result)=$sth->fetchrow; -- 2.39.5