getHosts() changed sql style
This commit is contained in:
parent
cebfdd6558
commit
6d32c03351
1 changed files with 7 additions and 3 deletions
|
@ -129,9 +129,13 @@ class Application_Model_Show
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection();
|
$con = Propel::getConnection();
|
||||||
|
|
||||||
$sql = "SELECT first_name, last_name
|
$sql = <<<SQL
|
||||||
FROM cc_show_hosts LEFT JOIN cc_subjs ON cc_show_hosts.subjs_id = cc_subjs.id
|
SELECT first_name,
|
||||||
WHERE show_id = :show_id";
|
last_name
|
||||||
|
FROM cc_show_hosts
|
||||||
|
LEFT JOIN cc_subjs ON cc_show_hosts.subjs_id = cc_subjs.id
|
||||||
|
WHERE show_id = :show_id
|
||||||
|
SQL;
|
||||||
|
|
||||||
$hosts = Application_Common_Database::prepareAndExecute( $sql,
|
$hosts = Application_Common_Database::prepareAndExecute( $sql,
|
||||||
array( ':show_id' => $this->getId() ), 'all');
|
array( ':show_id' => $this->getId() ), 'all');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue