public function getByCountriesCities($country_id = 0, $city_id = 0) { $where = '1=1'; if ($country_id != 0) { $where = $where . " and `jobs`.`country_id`='{$country_id}' "; } if ($city_id != 0) { $where = $where . " and `jobs`.`city_id`='{$city_id}' "; } $jobsModel = new jobsModel(); $search_jobs = $jobsModel->get_by_condition($where); $view = new viewModel('job_search'); $view->assign('search_jobs', $search_jobs); }