Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
denise 2012-09-06 14:30:20 -04:00
commit 8534cf16d8
1 changed files with 6 additions and 6 deletions

View File

@ -127,14 +127,14 @@ class Application_Model_Show
$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}";
WHERE show_id = :show_id";
$hosts = $con->query($sql)->fetchAll();
$hosts = Application_Common_Database::prepareAndExecute( $sql,
array( ':show_id' => $this->_showId ), 'all');
$res = array();
foreach ($hosts as $host) {
$res[] = $host['first_name']." ".$host['last_name'];
}
$res = array_map( function($host) {
return $host['first_name']." ".$host['last_name'];
}, $hosts);
return $res;
}