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'] ':add_show_id' => $p_data['add_show_id']
)); ));
$sql = "UPDATE cc_show_instances " // TODO : get rid of this
."SET ends = starts + INTERVAL '$p_data[add_show_duration]' " //$sql = "UPDATE cc_show_instances "
."WHERE show_id = $p_data[add_show_id] " //."SET ends = starts + INTERVAL '$p_data[add_show_duration]' "
."AND ends > TIMESTAMP '$timestamp'"; //."WHERE show_id = $p_data[add_show_id] "
$con->exec($sql); //."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) private function updateStartDateTime($p_data, $p_endDate)