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