PDO'd UpdateBroadcastedStatus
This commit is contained in:
parent
643c00418a
commit
414d1fa511
1 changed files with 11 additions and 4 deletions
|
@ -381,11 +381,18 @@ SQL;
|
||||||
global $CC_CONFIG;
|
global $CC_CONFIG;
|
||||||
$con = Propel::getConnection();
|
$con = Propel::getConnection();
|
||||||
$now = $dateTime->format("Y-m-d H:i:s");
|
$now = $dateTime->format("Y-m-d H:i:s");
|
||||||
$sql = "UPDATE ".$CC_CONFIG['scheduleTable']
|
|
||||||
." SET broadcasted=$value"
|
|
||||||
." WHERE starts <= '$now' AND ends >= '$now'";
|
|
||||||
$retVal = $con->exec($sql);
|
|
||||||
|
|
||||||
|
$sql = <<<SQL
|
||||||
|
UPDATE cc_schedule
|
||||||
|
SET broadcasted=:broadcastedValue
|
||||||
|
WHERE starts <= :starts::TIMESTAMP
|
||||||
|
AND ends >= :ends::TIMESTAMP
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
$retVal = Application_Common_Database::prepareAndExecute($sql, array(
|
||||||
|
':broadcastedValue' => $value,
|
||||||
|
':starts' => $now,
|
||||||
|
':ends' => $now), 'execute');
|
||||||
return $retVal;
|
return $retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue