[eluser]bobbob[/eluser]
This is probably simple but I don't see it.
Code:
$pages = explode(",",$pages_string);
$this->db->select('name, text,page_number');
$this->db->where('article_id',$id);
$this->db->where('page_number',$pages[0]);
$this->db->or_where('page_number',$pages[1]);
$this->db->order_by('page_number');
$q = $this->db->get('articles');
This will write ors for all 3 conditions but as you guessed i want ors for the page numbers and AND for the article_id.
Can I do this with active record or do I need to just use $this->db->query()?