From: yashodha Date: Tue, 24 Apr 2018 06:10:10 +0000 (+0530) Subject: core/issues/74 - 'Price Set Details for Event Participants' gives DB error if the... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=63794520df4a8b20e55dd629c2a9f5645b2df6b9;p=civicrm-core.git core/issues/74 - 'Price Set Details for Event Participants' gives DB error if the price fields are disabled. --- diff --git a/CRM/Contact/Form/Search/Custom/PriceSet.php b/CRM/Contact/Form/Search/Custom/PriceSet.php index 327ddc88b9..86d6631495 100644 --- a/CRM/Contact/Form/Search/Custom/PriceSet.php +++ b/CRM/Contact/Form/Search/Custom/PriceSet.php @@ -146,12 +146,14 @@ ORDER BY c.id, l.price_field_value_id; foreach (array_keys($rows) as $participantID) { $values = implode(',', $rows[$participantID]); - $sql = " + if ($values) { + $sql = " UPDATE {$this->_tableName} SET $values WHERE participant_id = $participantID; "; - CRM_Core_DAO::executeQuery($sql); + CRM_Core_DAO::executeQuery($sql); + } } }