summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-10 09:12:59 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-10 09:12:59 +0000
commitc13392b861fe83c2e28dd7804cfba563fcc61b3c (patch)
treecefe6cef4e9bbf0530e5bd73269de935dfd56e30 /lib
parentc618501c9f69400730fcaece107c8e09bc08911f (diff)
downloadampache-c13392b861fe83c2e28dd7804cfba563fcc61b3c.tar.gz
ampache-c13392b861fe83c2e28dd7804cfba563fcc61b3c.tar.bz2
ampache-c13392b861fe83c2e28dd7804cfba563fcc61b3c.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/class/browse.class.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/class/browse.class.php b/lib/class/browse.class.php
index 61baebcf..2767b749 100644
--- a/lib/class/browse.class.php
+++ b/lib/class/browse.class.php
@@ -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;
}