this query not working in my phalcon project but it execute in mysql very well.
$query="SELECT distinct ats.status_id, astat.value FROM ActivityTypeStatus ats, ActivityStatus astat where ats.type_id IN(1,4,2) and ats.status_id = astat.status_id"; $activity_status = $this->modelsManager->createQuery($query); $rows = $activity_status->execute();