diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index 02a8bb7a0..db23edea0 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -803,23 +803,19 @@ SQL; ':add_show_id' => $p_data['add_show_id'] )); - // TODO : get rid of this - //$sql = "UPDATE cc_show_instances " - //."SET ends = starts + INTERVAL '$p_data[add_show_duration]' " - //."WHERE show_id = $p_data[add_show_id] " - //."AND ends > TIMESTAMP '$timestamp'"; + $sql = << TIMESTAMP :timestamp +AND ends > :timestamp::TIMESTAMP SQL; + - Application_Common_Database::prepareAndExecute( $sql, - array( - ':add_show_duration' => $p_data['add_show_duration'], - ':show_id' => $p_data['add_show_id'], - ':timestamp' => $timestamp), "execute"); + Application_Common_Database::prepareAndExecute( $sql, array( + ':add_show_duration' => $p_data['add_show_duration'], + ':show_id' => $p_data['add_show_id'], + ':timestamp' => $timestamp), "execute"); } private function updateStartDateTime($p_data, $p_endDate)