From 330828fbdd28aa840c399e36d3dcff9ae934c887 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 4 Sep 2012 13:52:33 -0400 Subject: [PATCH] Refactored sql substition into pdo --- airtime_mvc/application/models/Show.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index b033e18b9..ba5b3c3a2 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -1223,8 +1223,9 @@ class Application_Model_Show $p_populateUntilDateTime = $date; } - $sql = "SELECT * FROM cc_show_days WHERE show_id = $p_showId"; - $res = $con->query($sql)->fetchAll(); + $con->prepare("SELECT * FROM cc_show_days WHERE show_id = :show_id"); + $con->bindParam(':show_id', $p_showId); + $res = $con->execute()->fetchAll(); foreach ($res as $showDaysRow) { Application_Model_Show::populateShow($showDaysRow, $p_populateUntilDateTime);