From 8c522352d7e8afdaac3c588a20f49cfe4cf28252 Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 29 Mar 2011 12:47:34 -0400 Subject: [PATCH] CC-2110 : Soundcloud file metadata adding a users function which will prob be used for metadata... when I see what's needed. --- application/models/Shows.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/application/models/Shows.php b/application/models/Shows.php index 8aa83beae..fc78138e3 100644 --- a/application/models/Shows.php +++ b/application/models/Shows.php @@ -58,6 +58,24 @@ class Show { $show->setDbBackgroundColor($backgroundColor); } + public function getHosts() + { + global $CC_DBC; + + $sql = "SELECT first_name, last_name + FROM cc_show_hosts LEFT JOIN cc_subjs ON cc_show_hosts.subjs_id = cc_subjs.id + WHERE show_id = {$this->_showId}"; + + $hosts = $CC_DBC->GetAll($sql); + + $res = array(); + foreach($hosts as $host) { + $res[] = $host['first_name']." ".$host['last_name']; + } + + return $res; + } + public function cancelShow($day_timestamp) { global $CC_DBC;