}
public static function deleteWidgetCacheByProgressbar($pbId) {
- $query = "SELECT wc.widget_id FROM civicrm_wci_widget_cache as wc INNER JOIN civicrm_wci_widget w on w.id = wc.widget_id WHERE w.progress_bar_id =%1";
+ $query = "DELETE wc FROM civicrm_wci_widget_cache as wc INNER JOIN civicrm_wci_widget w on w.id = wc.widget_id WHERE w.progress_bar_id =%1";
$dao = CRM_Core_DAO::executeQuery($query, array(1 => array($pbId, 'Integer')), TRUE, 'CRM_Wci_DAO_WidgetCache');
- while ($dao->fetch()) {
- $widget_id = $dao->widget_id;
- CRM_Wci_BAO_WidgetCache::deleteWidgetCache($widget_id);
- }
}
}