librefm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Librefm-commits] [1850] query a list of all artists


From: Clint Adams
Subject: [Librefm-commits] [1850] query a list of all artists
Date: Wed, 27 May 2009 03:57:17 +0000

Revision: 1850
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1850
Author:   clint
Date:     2009-05-27 03:57:17 +0000 (Wed, 27 May 2009)
Log Message:
-----------
query a list of all artists

Modified Paths:
--------------
    trunk/nixtape/data/Server.php

Modified: trunk/nixtape/data/Server.php
===================================================================
--- trunk/nixtape/data/Server.php       2009-05-26 23:53:41 UTC (rev 1849)
+++ trunk/nixtape/data/Server.php       2009-05-27 03:57:17 UTC (rev 1850)
@@ -413,4 +413,25 @@
                return $session_id;
        }
 
+
+       static function getAllArtists() {
+               global $adodb;
+
+               $sql = 'SELECT * from Artist ORDER by name';
+               $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+               try {
+                       $res = $adodb->CacheGetAll(86400,$sql);
+               } catch (exception $e) {
+                       return null;
+               }
+
+               foreach($res as &$i) {
+                       $row = sanitize($i);
+
+                       $row['artisturl'] = Server::getArtistURL($row['name']);
+               }
+
+               return $res;
+       }
+
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]