cc-4347: PDO like a boss.
This commit is contained in:
parent
22a250b5d2
commit
2a00e58610
|
@ -419,17 +419,20 @@ SQL;
|
||||||
*/
|
*/
|
||||||
public function getRebroadcastsAbsolute()
|
public function getRebroadcastsAbsolute()
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection();
|
$sql = <<<SQL
|
||||||
|
SELECT starts
|
||||||
|
FROM cc_show_instances
|
||||||
|
WHERE instance_id =
|
||||||
|
(SELECT id
|
||||||
|
FROM cc_show_instances
|
||||||
|
WHERE show_id = :showId
|
||||||
|
ORDER BY starts LIMIT 1)
|
||||||
|
AND rebroadcast = 1
|
||||||
|
ORDER BY starts
|
||||||
|
SQL;
|
||||||
|
|
||||||
$showId = $this->getId();
|
$rebroadcasts = Application_Common_Database::prepareAndExecute( $sql,
|
||||||
|
array( 'showId' => $this->getId() ), 'all' );
|
||||||
$sql = "SELECT starts FROM cc_show_instances "
|
|
||||||
."WHERE instance_id = (SELECT id FROM cc_show_instances WHERE show_id = $showId ORDER BY starts LIMIT 1) AND rebroadcast = 1 "
|
|
||||||
."ORDER BY starts";
|
|
||||||
|
|
||||||
//Logging::info($sql);
|
|
||||||
|
|
||||||
$rebroadcasts = $con->query($sql)->fetchAll();
|
|
||||||
|
|
||||||
$rebroadcastsLocal = array();
|
$rebroadcastsLocal = array();
|
||||||
//get each rebroadcast show in cc_show_instances, convert to current timezone to get start date/time.
|
//get each rebroadcast show in cc_show_instances, convert to current timezone to get start date/time.
|
||||||
|
|
Loading…
Reference in New Issue