'; // get the 'it' tag $tag = $this->getFinder('tags')->find(1); foreach($tag->job_posts as $job) { echo $job->Id .': '. $job->EmployerName .', '. $job->Id .': '. $job->Title .'
'; } // no using active records echo '

Not-AR
'; $this->db->select(" JobPostings.Id, JobPostings.EmployerName, JobPostings.Instructions, JobPostings.ClickThroughUrl, JobPostings.ContentId, JobPostings.Alternate, Content.Title, Content.IsDeleted, Content.IsApproved, Content.IsRejected, Content.IsPaidFor, Content.IsPublic, Content.DateCreated, Content.DateUpdated, Content.DateExpired "); $this->db->from("JobPostings"); $this->db->join("Content", "JobPostings.ContentId = Content.Id"); $this->db->join("ContentTags", "Content.Id = ContentTags.ContentId"); $this->db->join("Tags", "ContentTags.TagId = Tags.Id"); $this->db->where("Tags.Id", 1); $result = $this->db->get(); foreach($result->result_array() as $row) { echo $row['Id'] .': '. $row['EmployerName'] .', '. $row['Id'] .': '. $row['Title'] .'
'; } } }