summaryrefslogtreecommitdiffstats
path: root/lib/class/album.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/class/album.class.php')
-rw-r--r--lib/class/album.class.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/class/album.class.php b/lib/class/album.class.php
index 29dc9ee2..5e44af8b 100644
--- a/lib/class/album.class.php
+++ b/lib/class/album.class.php
@@ -93,20 +93,20 @@ class Album {
} // _get_info
- /*!
- @function get_songs
- @discussion gets the songs for this album
- */
- function get_songs($limit = 0) {
+ /**
+ * get_songs
+ * gets the songs for this album
+ */
+ public function get_songs($limit = 0) {
$results = array();
- $sql = "SELECT id FROM song WHERE album='$this->id' ORDER BY track, title";
+ $sql = "SELECT `id` FROM `song` WHERE `album`='$this->id' ORDER BY `track`, `title`";
if ($limit) { $sql .= " LIMIT $limit"; }
- $db_results = mysql_query($sql, dbh());
+ $db_results = Dba::query($sql);
- while ($r = mysql_fetch_object($db_results)) {
- $results[] = new Song($r->id);
+ while ($r = Dba::fetch_assoc($db_results)) {
+ $results[] = $r['id'];
}
return $results;