diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-04-21 07:00:33 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-04-21 07:00:33 +0000 |
commit | a850381ad262457940b639d0735794a19ae58f66 (patch) | |
tree | 17cc66869aec788aed15d55ab5c804e9f7c5c4d6 /lib | |
parent | 6d9533844cf95de3f7e013600b7eb84f0518dded (diff) | |
download | ampache-a850381ad262457940b639d0735794a19ae58f66.tar.gz ampache-a850381ad262457940b639d0735794a19ae58f66.tar.bz2 ampache-a850381ad262457940b639d0735794a19ae58f66.zip |
fixed the sql file... stupid mysql_dump
Diffstat (limited to 'lib')
-rw-r--r-- | lib/search.php | 2 | ||||
-rw-r--r-- | lib/song.php | 8 |
2 files changed, 2 insertions, 8 deletions
diff --git a/lib/search.php b/lib/search.php index ed2b3cec..5ab121ba 100644 --- a/lib/search.php +++ b/lib/search.php @@ -219,7 +219,7 @@ function show_search($type,$results) { break; case 'song': default: - show_songs($results); + show_songs($results,0); break; } // end type switch diff --git a/lib/song.php b/lib/song.php index 81095cc1..5156ca88 100644 --- a/lib/song.php +++ b/lib/song.php @@ -96,17 +96,11 @@ function get_song_id_from_file($filename) { $filename = sql_escape($filename); - $sql = "SELECT id FROM song WHERE file='$filename'"; + $sql = "SELECT id FROM song WHERE file LIKE '%$filename'"; $db_results = mysql_query($sql, dbh()); $results = mysql_fetch_assoc($db_results); - if (!$results['id']) { - $sql = "SELECT id FROM song WHERE file='%$filename%'"; - $db_results = mysql_query($sql, dbh()); - $results = mysql_fetch_assoc($db_results); - } - return $results['id']; } // get_song_id_from_file |