From 45250f50194cac99fde9569d8e8fd54ad89db179 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Mon, 23 Apr 2007 07:51:12 +0000 Subject: added favorite X play links --- lib/class/artist.class.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'lib/class/artist.class.php') diff --git a/lib/class/artist.class.php b/lib/class/artist.class.php index 18fa31cf..0de280c0 100644 --- a/lib/class/artist.class.php +++ b/lib/class/artist.class.php @@ -25,11 +25,11 @@ class Artist { /* Variables from DB */ - var $id; - var $name; - var $songs; - var $albums; - var $prefix; + public $id; + public $name; + public $songs; + public $albums; + public $prefix; /** * Artist @@ -91,17 +91,17 @@ class Artist { } // get_albums - /*! - @function get_songs - @discussion gets the songs for this artist - */ + /** + * get_songs + * gets the songs for this artist + */ function get_songs() { - $sql = "SELECT song.id FROM song WHERE song.artist='" . sql_escape($this->id) . "'"; - $db_results = mysql_query($sql, dbh()); + $sql = "SELECT `song`.`id` FROM `song` WHERE `song`.`artist`='" . Dba::escape($this->id) . "'"; + $db_results = Dba::query($sql); - while ($r = mysql_fetch_assoc($db_results)) { - $results[] = new Song($r['id']); + while ($r = Dba::fetch_assoc($db_results)) { + $results[] = $r['id']; } return $results; -- cgit