diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index 46884169c0..1b989962ce 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -275,7 +275,7 @@ sub GetShelfContents { WHERE vc.shelfnumber=? "; my @params = ($shelfnumber); if($sortfield) { - $query .= " ORDER BY " . $sortfield; + $query .= " ORDER BY " . $dbh->quote_identifier( $sortfield ); $query .= " DESC " if ( $sort_direction eq 'desc' ); } if($row_count){