bugfix: Sort previous borrowers descending in Items.pm for moredetail.pl
authorMichael Hafen <mdhafen@tech.washk12.org>
Wed, 1 Oct 2008 20:14:56 +0000 (14:14 -0600)
committerGalen Charlton <galen.charlton@liblime.com>
Thu, 16 Oct 2008 19:47:11 +0000 (14:47 -0500)
The list of previous borrowers on moredetail.pl shows the three oldest
rather than the three most recent as I expected.  This changes the sql
to order descending so we get the three most recent.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
C4/Items.pm

index 1f92491..3aef697 100644 (file)
@@ -1295,6 +1295,7 @@ sub GetItemsInfo {
         my $sth2 = $dbh->prepare("SELECT * FROM old_issues,borrowers
                                     WHERE itemnumber = ?
                                     AND old_issues.borrowernumber = borrowers.borrowernumber
+                                    ORDER BY returndate DESC
                                     LIMIT 3");
         $sth2->execute($data->{'itemnumber'});
         my $ii = 0;