Fix to ORDER BY SQL in lists feature

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
David Birmingham 2009-10-07 17:27:35 -04:00 committed by Galen Charlton
parent 3b39195500
commit 816dbb2420

View file

@ -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 ?, ? ";