show cancelling available (needed for repeating shows)

This commit is contained in:
naomiaro 2011-02-12 17:21:37 -05:00
parent 9a7dda49fe
commit a83a4b6bae
5 changed files with 61 additions and 28 deletions

View file

@ -49,6 +49,21 @@ class Show {
$show->setDbBackgroundColor($backgroundColor);
}
public function cancelShow($day_timestamp) {
global $CC_DBC;
$timeinfo = explode(" ", $day_timestamp);
CcShowDaysQuery::create()
->filterByDbShowId($this->_showId)
->update(array('DbLastShow' => $timeinfo[0]));
$sql = "DELETE FROM cc_show_instances
WHERE starts >= '{$day_timestamp}' AND show_id = {$this->_showId}";
$CC_DBC->query($sql);
}
//end dates are non inclusive.
public static function addShow($data) {