# Campaign does not run as intended (SQL error)

**URL:** https://forum.mautic.org/t/campaign-does-not-run-as-intended-sql-error/22193
**Category:** Product Support
**Tags:** mautic-4
**Created:** [December 30, 2021, 9:50pm UTC](https://forum.mautic.org/t/campaign-does-not-run-as-intended-sql-error/22193 "2021-12-30T21:50:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![nickbm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/nickbm/32/6488_2.png) [@nickbm](https://forum.mautic.org/u/nickbm)
#### Post date: [December 30, 2021, 9:50pm UTC](https://forum.mautic.org/t/campaign-does-not-run-as-intended-sql-error/22193/1 "2021-12-30T21:50:30Z")

</div>

**Your software**  
My Mautic version is: 4.1.1  
My PHP version is: 7.4.27  
My Database type and version is: 8.0.27

**Your problem**  
My problem is:  
A certain campaign does not work as intended.

These errors are showing in the log:  
[2021-12-30 23:48:25] 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

Steps I have tried to fix the problem:  
Nothing.
