cc-4347: pdo

This commit is contained in:
Rudi Grinberg 2012-09-06 16:17:14 -04:00
parent 2b659f9c91
commit f30507fce6
1 changed files with 17 additions and 6 deletions

View File

@ -803,12 +803,23 @@ SQL;
':add_show_id' => $p_data['add_show_id']
));
$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'";
$con->exec($sql);
// 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 = <<<SQL
UPDATE cc_show_instances
SET ends = starts + INTERVAL :add_show_duration
WHERE show_id = :show_id
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");
}
private function updateStartDateTime($p_data, $p_endDate)