diff --git a/airtime_mvc/application/models/ShowInstance.php b/airtime_mvc/application/models/ShowInstance.php index 1c8c66783..c19d8c3b7 100644 --- a/airtime_mvc/application/models/ShowInstance.php +++ b/airtime_mvc/application/models/ShowInstance.php @@ -809,11 +809,13 @@ SQL; // returns number of show instances that ends later than $day public static function GetShowInstanceCount($day) { - global $CC_CONFIG; - $con = Propel::getConnection(); - $sql = "SELECT count(*) as cnt FROM $CC_CONFIG[showInstances] WHERE ends < '$day'"; - - return $con->query($sql)->fetchColumn(0); + $sql = << $day ), 'column' ); } // this returns end timestamp of all shows that are in the range and has live DJ set up