From e2c2f67fbb51882101e7e5b46b3e44abf26b216b Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 10 Sep 2012 11:29:28 -0400 Subject: [PATCH] cc-4347: GetShowInstanceCount() pdo'd --- airtime_mvc/application/models/ShowInstance.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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