From 414d1fa5112508b46167ae6e656095386605c191 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 12 Sep 2012 16:09:28 -0400 Subject: [PATCH] PDO'd UpdateBroadcastedStatus --- airtime_mvc/application/models/Schedule.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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; }