Refactored sql substition into pdo

This commit is contained in:
Rudi Grinberg 2012-09-04 13:52:33 -04:00
parent 27ea00f5d4
commit 330828fbdd

View file

@ -1223,8 +1223,9 @@ class Application_Model_Show
$p_populateUntilDateTime = $date; $p_populateUntilDateTime = $date;
} }
$sql = "SELECT * FROM cc_show_days WHERE show_id = $p_showId"; $con->prepare("SELECT * FROM cc_show_days WHERE show_id = :show_id");
$res = $con->query($sql)->fetchAll(); $con->bindParam(':show_id', $p_showId);
$res = $con->execute()->fetchAll();
foreach ($res as $showDaysRow) { foreach ($res as $showDaysRow) {
Application_Model_Show::populateShow($showDaysRow, $p_populateUntilDateTime); Application_Model_Show::populateShow($showDaysRow, $p_populateUntilDateTime);