cc-4347: PDOOOOOOOOOOOOOOOO
This commit is contained in:
parent
acf06e289f
commit
45729f16e7
|
@ -127,14 +127,14 @@ class Application_Model_Show
|
||||||
|
|
||||||
$sql = "SELECT first_name, last_name
|
$sql = "SELECT first_name, last_name
|
||||||
FROM cc_show_hosts LEFT JOIN cc_subjs ON cc_show_hosts.subjs_id = cc_subjs.id
|
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();
|
$res = array_map( function($host) {
|
||||||
foreach ($hosts as $host) {
|
return $host['first_name']." ".$host['last_name'];
|
||||||
$res[] = $host['first_name']." ".$host['last_name'];
|
}, $hosts);
|
||||||
}
|
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue