# SQL error when running mautic:leadlists:update

**URL:** <https://forum.mautic.org/t/sql-error-when-running-mauticupdate/5179>\
**Category:** Product Support\
**Created:** [April 7, 2016, 7:32am UTC](https://forum.mautic.org/t/sql-error-when-running-mauticupdate/5179 "2016-04-07T07:32:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt\_spank](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@matt\_spank](https://forum.mautic.org/u/matt_spank)\
**Post date:** [April 7, 2016, 7:32am UTC](https://forum.mautic.org/t/sql-error-when-running-mauticupdate/5179/1 "2016-04-07T07:32:08Z")

</div>

Hi!  
  
  
  
We need urgent help and support.  
  
  
  
Because the leadlist update and the point update in our campaigns (f.e. DOI) doesn´t work, our developper checked it on the server and he got the follwoing error:  
  
[DoctrineDBALDBALException]  
  
An exception occurred while executing ‘SELECT count(l.id) as lead\_count, max(l.id) as max\_id FROM leads l WHERE ()’:  
  
SQLSTATE[42000]: Syntax error or access violation: 1064 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 ‘)’ at l  
  
ine 1  
  
All debugging couldn´t solve the problem.  
  
  
  
More detailled here:  
  
  
  
[https://github.com/mautic/mautic/issues/1575](https://github.com/mautic/mautic/issues/1575)  
  
  
  
All cron jobs are set as in the manula described.  
  
  
  
The DOI campaign was set up like described here: [https://www.mautic.org/blog/integrator/creating-a-double-opt-in-email-campaign/](https://www.mautic.org/blog/integrator/creating-a-double-opt-in-email-campaign/)  
  
  
  
Thanks in advance for your support!!!  
  
  
  
Matt

---

<div class="post-metadata">

**Author:** ![matt\_spank](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@matt\_spank](https://forum.mautic.org/u/matt_spank)\
**Post date:** [April 7, 2016, 7:32am UTC](https://forum.mautic.org/t/sql-error-when-running-mauticupdate/5179/2 "2016-04-07T07:32:08Z")

</div>

Hi!

We need urgent help and support.

Because the leadlist update and the point update in our campaigns (f.e. DOI) doesn´t work, our developper checked it on the server and he got the follwoing error:  
[DoctrineDBALDBALException]  
An exception occurred while executing ‘SELECT count(l.id) as lead\_count, max(l.id) as max\_id FROM leads l WHERE ()’:  
SQLSTATE[42000]: Syntax error or access violation: 1064 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 ‘)’ at l  
ine 1  
All debugging couldn´t solve the problem.

More detailled here:

[https://github.com/mautic/mautic/issues/1575](https://github.com/mautic/mautic/issues/1575)

All cron jobs are set as in the manula described.

The DOI campaign was set up like described here: [https://www.mautic.org/blog/integrator/creating-a-double-opt-in-email-campaign/](https://www.mautic.org/blog/integrator/creating-a-double-opt-in-email-campaign/)

Thanks in advance for your support!!!

Matt
