cc-4347: PDO'd deleteAllRebroadcasts()
This commit is contained in:
parent
ad776ff8f3
commit
efb35dd9d6
|
@ -572,15 +572,16 @@ SQL;
|
||||||
*/
|
*/
|
||||||
public function deleteAllRebroadcasts()
|
public function deleteAllRebroadcasts()
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection();
|
$sql = <<<SQL
|
||||||
|
DELETE
|
||||||
$timestamp = gmdate("Y-m-d H:i:s");
|
FROM cc_show_instances
|
||||||
|
WHERE starts > :timestamp::TIMESTAMP
|
||||||
$showId = $this->getId();
|
AND show_id :showId
|
||||||
$sql = "DELETE FROM cc_show_instances"
|
AND rebroadcast 1
|
||||||
." WHERE starts > TIMESTAMP '$timestamp'"
|
SQL;
|
||||||
." AND show_id = $showId"
|
Application_Common_Database::prepareAndExecute( $sql,
|
||||||
." AND rebroadcast = 1";
|
array( ':showId' => $this->getId(),
|
||||||
|
':timestamp' => gmdate("Y-m-d H:i:s")), 'execute');
|
||||||
|
|
||||||
$con->exec($sql);
|
$con->exec($sql);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue