From 816dbb24203dc7f0eb3a04221a643c2531ed1e34 Mon Sep 17 00:00:00 2001 From: David Birmingham Date: Wed, 7 Oct 2009 17:27:35 -0400 Subject: [PATCH] Fix to ORDER BY SQL in lists feature Signed-off-by: Galen Charlton --- C4/VirtualShelves.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index 5e1c3f4d57..fc11fc903b 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -276,9 +276,8 @@ sub GetShelfContents ($;$$$) { WHERE vc.shelfnumber=? "; my @params = ($shelfnumber); if($sortfield) { - $query .= " ORDER BY ? "; + $query .= " ORDER BY " . $sortfield; $query .= " DESC " if ($sortfield eq 'copyrightdate'); - push (@params, $sortfield); } if($row_count){ $query .= " LIMIT ?, ? "; -- 2.39.5