All pastes #88596 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-07-15 04:25 UTC
rendered paste body

		$this->db->select('a.id, a.name, a.body, a.slug, s.id as sectionid, s.name as sectionname ');
		$this->db->where("s.id", $section);
		$this->db->where("a.position", $position);
		$this->db->where("m.article_id = a.id");
		$this->db->where("m.section_id = s.id");
		$this->db->orderby("a.id", "DESC");
		$query = $this->db->get('map as m, articles as a, section as s');
		if( $query->num_rows() > 0 )
		{
			return $query->result_array();
		}