diff --git a/airtime_mvc/application/models/Schedule.php b/airtime_mvc/application/models/Schedule.php index d77f5e4da..601253b8e 100644 --- a/airtime_mvc/application/models/Schedule.php +++ b/airtime_mvc/application/models/Schedule.php @@ -381,11 +381,18 @@ SQL; global $CC_CONFIG; $con = Propel::getConnection(); $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 = <<= :ends::TIMESTAMP +SQL; + + $retVal = Application_Common_Database::prepareAndExecute($sql, array( + ':broadcastedValue' => $value, + ':starts' => $now, + ':ends' => $now), 'execute'); return $retVal; }