Mautic Community Forums

Database error

Hi there,



I am having error with my mautic campaign:



When I run this job:

http://mautic.manamano.com.br/extcronjob.php?mauticmanamano2015&task=mautic%3Acampaigns%3Aupdate+-f



wich is this code line:

php /path/to/mautic/app/console mautic:campaigns:trigger



It comes this error:

An exception occurred while executing ‘SELECT max(list_leads.lead_id) as max_id, count(distinct(list_leads.lead_id)) as lead_count FROM tb_lead_lists_leads list_leads WHERE (list_leads.manually_removed = ?) AND (list_leads.leadlist_id IN ()) AND (list_leads.date_added <= ‘2016-01-06 12:10:46’) AND (NOT EXISTS (SELECT null FROM tb_campaign_leads campaign_leads WHERE (campaign_leads.lead_id = list_leads.lead_id) AND (campaign_leads.manually_removed = ?) AND (campaign_leads.campaign_id = 2)))’ with params [0, 0]:

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 ')) AND (list_leads.date_added <= ‘2016-01-06 12:10:46’) AND (NOT EXISTS (SELECT ’ at line 1

[PDOException]

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 ')) AND (list_leads.date_added <= ‘2016-01-06 12:10:46’) AND (NOT EXISTS (SELECT ’ at line 1



I don`t know what else to try, has anyone come across this before?



Thanks in advance

Hi there,

I am having error with my mautic campaign:

When I run this job:
http://mautic.manamano.com.br/extcronjob.php?mauticmanamano2015&task=mautic%3Acampaigns%3Aupdate+-f

wich is this code line:
php /path/to/mautic/app/console mautic:campaigns:trigger

It comes this error:
An exception occurred while executing ‘SELECT max(list_leads.lead_id) as max_id, count(distinct(list_leads.lead_id)) as lead_count FROM tb_lead_lists_leads list_leads WHERE (list_leads.manually_removed = ?) AND (list_leads.leadlist_id IN ()) AND (list_leads.date_added <= ‘2016-01-06 12:10:46’) AND (NOT EXISTS (SELECT null FROM tb_campaign_leads campaign_leads WHERE (campaign_leads.lead_id = list_leads.lead_id) AND (campaign_leads.manually_removed = ?) AND (campaign_leads.campaign_id = 2)))’ with params [0, 0]:
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 ')) AND (list_leads.date_added <= ‘2016-01-06 12:10:46’) AND (NOT EXISTS (SELECT ’ at line 1
[PDOException]
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 ')) AND (list_leads.date_added <= ‘2016-01-06 12:10:46’) AND (NOT EXISTS (SELECT ’ at line 1

I don`t know what else to try, has anyone come across this before?

Thanks in advance

I got the same error while testing this pull request:

https://github.com/mautic/mautic/pull/1286

So there is a chance it fixes your issue as well. Would be great if you could test it.

Escopecz thanks for the reply it fixed my error.

Problem I was having after fixing this issue was that my emails were not being sent. I figure the when my email config was set to queue it was not being sent. So I changed it to immediately and it works now.

thanks a lot for the help

@felipe that’s great! If you’ve tested the pull request, it would be really great if you could comment below the pull request for the record how the test went for you. Every additional test will speed up the release of the new version and makes Mautic more stable :wink:

@escopecz I commented below the pull request.
thanks for the help.