Code:
$query = $this->modelsManager->createQuery("SELECT id,first_name,last_name,contact_email from Contacts where flag=1 UNION ALL SELECT id,first_name,last_name,bounce_email_address from MailchimpImportContacts where flag=1");
$contacts = $query->execute();**
Hello Friends When I used above query getting error such as :
Syntax error, unexpected token IDENTIFIER(UNION), near to ' ALL SELECT id,first_name,last_name,bounce_email_address from MailchimpImportContacts where flag=1', when parsing: SELECT id,first_name,last_name,contact_email from Contacts where flag=1 UNION ALL SELECT id,first_name,last_name,bounce_email_address from MailchimpImportContacts where flag=1 (175)
How to resolve it