mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 02:39:47 +02:00
tiny little tweak, came to me right before I headed off to bed, makes the sql query a tiny bit shorter when not doing basic sorts
This commit is contained in:
parent
c618501c9f
commit
c13392b861
1 changed files with 6 additions and 2 deletions
|
@ -679,11 +679,15 @@ class Browse {
|
|||
// If there's nothing there don't do anything
|
||||
if (!count($objects)) { return false; }
|
||||
|
||||
$where_sql .= "`id` IN (";
|
||||
|
||||
foreach ($objects as $object_id) {
|
||||
$object_id = Dba::escape($object_id);
|
||||
$where_sql .= "`id`='$object_id' OR";
|
||||
$where_sql .= "'$object_id',";
|
||||
}
|
||||
$where_sql = rtrim($where_sql,'OR');
|
||||
$where_sql = rtrim($where_sql,',');
|
||||
|
||||
$where_sql .= ")";
|
||||
|
||||
$sql = self::get_base_sql() . ' WHERE ' . $where_sql;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue