# Does not remove the contact from the campaign

**URL:** <https://forum.mautic.org/t/does-not-remove-the-contact-from-the-campaign/11364>\
**Category:** Product Support\
**Created:** [October 12, 2019, 1:28am UTC](https://forum.mautic.org/t/does-not-remove-the-contact-from-the-campaign/11364 "2019-10-12T01:28:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![deepti](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/deepti/32/411_2.png) [@deepti](https://forum.mautic.org/u/deepti)\
**Post date:** [October 12, 2019, 1:28am UTC](https://forum.mautic.org/t/does-not-remove-the-contact-from-the-campaign/11364/1 "2019-10-12T01:28:45Z")

</div>

**Your software**  
My Mautic version is: 2.15.3  
My PHP version is: 7.1

**Your problem**  
My problem is: Does not remove the contact from the campaign.

These errors are showing in the log:

[2019-10-11 07:45:02] mautic.ERROR: CAMPAIGN: An exception occurred while executing ‘REPLACE INTO campaign\_lead\_event\_failed\_log( `log_id`, `date_added`, `reason`) SELECT id, :dateAdded as date\_added, :message as reason from campaign\_lead\_event\_log WHERE is\_scheduled = 1 AND lead\_id = :contactId AND campaign\_id = :campaignId AND rotation = :rotation’: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':dateAdded as date\_added, :message as reason from campaign\_lead\_event\_log WHERE ’ at line 2

Error when remove manually:

[2019-10-11 10:03:33] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\SyntaxErrorException: “An exception occurred while executing ‘REPLACE INTO campaign\_lead\_event\_failed\_log( `log_id`, `date_added`, `reason`) SELECT id, :dateAdded as date\_added, :message as reason from campaign\_lead\_event\_log WHERE is\_scheduled = 1 AND lead\_id = :contactId AND campaign\_id = :campaignId AND rotation = :rotation’: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':dateAdded as date\_added, :message as reason from campaign\_lead\_event\_log WHERE ’ at line 2” at /home/cipcip/domains/crm._**.it/private\_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 90 {“exception”:"[object] (Doctrine\DBAL\Exception\SyntaxErrorException(code: 0): An exception occurred while executing ‘REPLACE INTO campaign\_lead\_event\_failed\_log( `log_id`, `date_added`, `reason`)\nSELECT id, :dateAdded as date\_added, :message as reason from campaign\_lead\_event\_log\nWHERE is\_scheduled = 1 AND lead\_id = :contactId AND campaign\_id = :campaignId AND rotation = :rotation’:\n\nYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':dateAdded as date\_added, :message as reason from campaign\_lead\_event\_log\nWHERE ’ at line 2 at /home/cipcip/domains/crm.**_.it/private\_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:90, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 0): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':dateAdded as date\_added, :message as reason from campaign\_lead\_event\_log\nWHERE ’ at line 2 at /home/cipcip/domains/crm.\*\*\*.it/private\_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:101)"}

Steps I have tried to fix the problem:

[https://www.mautic.org/docs/en/tips/troubleshooting.html](https://www.mautic.org/docs/en/tips/troubleshooting.html)

Thanks

Deepti

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [January 25, 2021, 8:52pm UTC](https://forum.mautic.org/t/does-not-remove-the-contact-from-the-campaign/11364/2 "2021-01-25T20:52:57Z")

</div>


