From c840de0a7130e8c7f5f2fe40e55ecc42e9d19a4a Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 4 Sep 2012 14:05:26 -0400 Subject: [PATCH] Fix to the fix --- airtime_mvc/application/models/Show.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index ba5b3c3a2..11709ce32 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -1223,9 +1223,10 @@ class Application_Model_Show $p_populateUntilDateTime = $date; } - $con->prepare("SELECT * FROM cc_show_days WHERE show_id = :show_id"); - $con->bindParam(':show_id', $p_showId); - $res = $con->execute()->fetchAll(); + $stmt = $con->prepare("SELECT * FROM cc_show_days WHERE show_id = :show_id"); + $stmt->bindParam(':show_id', $p_showId); + + $res = $stmt->execute()->fetchAll(); foreach ($res as $showDaysRow) { Application_Model_Show::populateShow($showDaysRow, $p_populateUntilDateTime); @@ -1621,17 +1622,17 @@ class Application_Model_Show $startTimeString = $today_timestamp->format("Y-m-d H:i:s"); } - $con->prepare(" + $stmt = $con->prepare(" SELECT * FROM cc_show_days WHERE last_show IS NULL OR first_show < :endTimeString AND last_show > :startTimeString"); - $stmt = $con->execute(array( + $stmt->execute(array( ':endTimeString' => $endTimeString, ':startTimeString' => $startTimeString )); - $res = $stm->fetchAll(); + $res = $stmt->fetchAll(); foreach ($res as $row) { Application_Model_Show::populateShow($row, $p_endTimestamp); }