Code:
$db = \Phalcon\DI::getDefault()->get('db');
$stmt = $db->prepare("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 mailchimp_import_contacts where flag=1");
$stmt->execute();
$contacts = $stmt->fetchAll(\PDO::FETCH_ASSOC);
When I excuted above i am getting issue like: Invalid data for paginator.
$paginator = new Phalcon\Paginator\Adapter\Model(array(
"data" => $contacts, //Data to paginate
"limit" => 30, //Rows per page
"page" => $numberPage //Active page
));
PLs help to fix it...