cc-4347: _-=~^PDO^~=-_

This commit is contained in:
Rudi Grinberg 2012-09-06 17:23:39 -04:00
parent f30507fce6
commit 73ba643563
1 changed files with 8 additions and 12 deletions

View File

@ -803,23 +803,19 @@ SQL;
':add_show_id' => $p_data['add_show_id'] ':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 = <<<SQL $sql = <<<SQL
UPDATE cc_show_instances UPDATE cc_show_instances
SET ends = starts + INTERVAL :add_show_duration SET ends = starts + :add_show_duration::INTERVAL
WHERE show_id = :show_id WHERE show_id = :show_id
AND ends > TIMESTAMP :timestamp AND ends > :timestamp::TIMESTAMP
SQL; SQL;
Application_Common_Database::prepareAndExecute( $sql, Application_Common_Database::prepareAndExecute( $sql, array(
array( ':add_show_duration' => $p_data['add_show_duration'],
':add_show_duration' => $p_data['add_show_duration'], ':show_id' => $p_data['add_show_id'],
':show_id' => $p_data['add_show_id'], ':timestamp' => $timestamp), "execute");
':timestamp' => $timestamp), "execute");
} }
private function updateStartDateTime($p_data, $p_endDate) private function updateStartDateTime($p_data, $p_endDate)