Beta2 bug fix. 31237 Option to display current amount instead of percentage
[com.zyxware.civiwci.git] / CRM / Wci / Page / ProgressBarList.php
index a0a33cd064708faab9bc11bbd098f98d7a33bec9..b20e6d5bb24d8a7fba97c98158f07844788462d0 100644 (file)
@@ -30,11 +30,13 @@ class CRM_Wci_Page_ProgressBarList extends CRM_Core_Page {
       $errorScope = CRM_Core_TemporaryErrorScope::useException();
       try {
         $transaction = new CRM_Core_Transaction();
-        $sql = "DELETE FROM civicrm_wci_progress_bar_formula where progress_bar_id = " . $id;
-        CRM_Core_DAO::executeQuery($sql);
+        $sql = "DELETE FROM civicrm_wci_progress_bar_formula where progress_bar_id = %1";
+        $params = array(1 => array($id, 'Integer'));
+        CRM_Core_DAO::executeQuery($sql, $params);
         
-        $sql = "DELETE FROM civicrm_wci_progress_bar where id = " . $id;
-        CRM_Core_DAO::executeQuery($sql);
+        $sql = "DELETE FROM civicrm_wci_progress_bar where id = %1";
+        $params = array(1 => array($id, 'Integer'));
+        CRM_Core_DAO::executeQuery($sql, $params);
         $transaction->commit();
       }
       catch (Exception $e) {