diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-09 15:32:18 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-09 15:32:18 +0000 |
commit | 50036b1fad29cc7e2b2da30cc63d95e48c625a2a (patch) | |
tree | 042c5dc1a29cdc5901138ef4267309e4dbd97035 /lib/search.php | |
parent | 242401a915eb2600f242af92c98cc9dc7190735c (diff) | |
download | ampache-50036b1fad29cc7e2b2da30cc63d95e48c625a2a.tar.gz ampache-50036b1fad29cc7e2b2da30cc63d95e48c625a2a.tar.bz2 ampache-50036b1fad29cc7e2b2da30cc63d95e48c625a2a.zip |
fix some browsing issues I created with the query switch, considering having browse class extend query
Diffstat (limited to 'lib/search.php')
-rw-r--r-- | lib/search.php | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/lib/search.php b/lib/search.php index 01946745..4a10aff7 100644 --- a/lib/search.php +++ b/lib/search.php @@ -182,7 +182,7 @@ function search_song($data,$operator,$method,$limit) { // This is a little more complext, pull a list of IDs that have this average rating $rating_sql = "SELECT `object_id`,AVG(`rating`.`rating`) AS avgrating FROM `rating` " . "WHERE `object_type`='song' GROUP BY `object_id`"; - $db_results = Dba::query($rating_sql); + $db_results = Dba::read($rating_sql); // Fill it with one value to prevent sql error on no results $where_sql .= " `song`.`id` IN ("; @@ -238,7 +238,7 @@ function search_song($data,$operator,$method,$limit) { */ $_SESSION['userdata']['stored_search'] = $sql; - $db_results = Dba::query($sql); + $db_results = Dba::read($sql); $results = array(); @@ -251,28 +251,4 @@ function search_song($data,$operator,$method,$limit) { } // search_songs -/** - * show_search - * This shows the results of a search, it takes the input from a run_search function call - * @package Search - * @catagory Display - */ -function show_search($type,$results) { - - /* Display based on the type of object we are trying to view */ - switch ($type) { - case 'artist': - - break; - case 'album': - - break; - case 'song': - default: - show_songs($results,0); - break; - } // end type switch - -} // show_search - ?> |