# Help !!! please

**URL:** <https://forum.mautic.org/t/help-please/3195>\
**Category:** General Discussion\
**Created:** [January 11, 2016, 10:24am UTC](https://forum.mautic.org/t/help-please/3195 "2016-01-11T10:24:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![celio](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/celio/32/50_2.png) [@celio](https://forum.mautic.org/u/celio)\
**Post date:** [January 11, 2016, 10:24am UTC](https://forum.mautic.org/t/help-please/3195/1 "2016-01-11T10:24:37Z")

</div>

Help !!! please  
  
Good afternoon I’m getting this error when running the command  
  
php /srv/users/serverpilot/apps/mautic/public/app/console mautic:campaigns:update -f --env=prod  
  
  
  
[DoctrineDBALDBALException]  
  
An exception occurred while executing ‘SELECT max(list\_leads.lead\_id) as ma  
  
x\_id, count(distinct(list\_leads.lead\_id)) as lead\_count FROM mautic\_lead\_li  
  
sts\_leads list\_leads WHERE (list\_leads.manually\_removed = ?) AND (list\_lead  
  
s.leadlist\_id IN ()) AND (list\_leads.date\_added \<= ‘2016-01-10 18:09:26’) A  
  
ND (NOT EXISTS (SELECT null FROM mautic\_campaign\_leads campaign\_leads WHERE  
  
(campaign\_leads.lead\_id = list\_leads.lead\_id) AND (campaign\_leads.manually  
  
\_removed = ?) AND (campaign\_leads.campaign\_id = 4)))’ with params [0, 0]:  
  
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error i  
  
n your SQL syntax; check the manual that corresponds to your MySQL server v  
  
ersion for the right syntax to use near ‘)) AND (list\_leads.date\_added \<= ’  
  
2016-01-10 18:09:26’) AND (NOT EXISTS (SELECT ’ at line 1  
  
  
  
[PDOException]  
  
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error i  
  
n your SQL syntax; check the manual that corresponds to your MySQL server v  
  
ersion for the right syntax to use near ‘)) AND (list\_leads.date\_added \<= ’  
  
2016-01-10 18:09:26’) AND (NOT EXISTS (SELECT ’ at line 1

---

<div class="post-metadata">

**Author:** ![celio](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/celio/32/50_2.png) [@celio](https://forum.mautic.org/u/celio)\
**Post date:** [January 11, 2016, 10:24am UTC](https://forum.mautic.org/t/help-please/3195/2 "2016-01-11T10:24:37Z")

</div>

Help !!! please  
Good afternoon I’m getting this error when running the command  
php /srv/users/serverpilot/apps/mautic/public/app/console mautic:campaigns:update -f --env=prod

[DoctrineDBALDBALException]  
An exception occurred while executing ‘SELECT max(list\_leads.lead\_id) as ma  
x\_id, count(distinct(list\_leads.lead\_id)) as lead\_count FROM mautic\_lead\_li  
sts\_leads list\_leads WHERE (list\_leads.manually\_removed = ?) AND (list\_lead  
s.leadlist\_id IN ()) AND (list\_leads.date\_added \<= ‘2016-01-10 18:09:26’) A  
ND (NOT EXISTS (SELECT null FROM mautic\_campaign\_leads campaign\_leads WHERE  
(campaign\_leads.lead\_id = list\_leads.lead\_id) AND (campaign\_leads.manually  
\_removed = ?) AND (campaign\_leads.campaign\_id = 4)))’ with params [0, 0]:  
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error i  
n your SQL syntax; check the manual that corresponds to your MySQL server v  
ersion for the right syntax to use near ‘)) AND (list\_leads.date\_added \<= ’  
2016-01-10 18:09:26’) AND (NOT EXISTS (SELECT ’ at line 1

[PDOException]  
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error i  
n your SQL syntax; check the manual that corresponds to your MySQL server v  
ersion for the right syntax to use near ‘)) AND (list\_leads.date\_added \<= ’  
2016-01-10 18:09:26’) AND (NOT EXISTS (SELECT ’ at line 1

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [January 11, 2016, 10:35am UTC](https://forum.mautic.org/t/help-please/3195/3 "2016-01-11T10:35:58Z")

</div>

Duplicate of [https://www.mautic.org/community/index.php/1460-help-campanha-mautic/0#p6092](https://www.mautic.org/community/index.php/1460-help-campanha-mautic/0#p6092) and answered there as well. Please, do not ask the same question in multiple places.
