[eluser]Eric Barnes[/eluser]
Hi,
I have this query:
Code:
SELECT * FROM kb_articles WHERE a_display = 'Y' AND a_id IN ( 1,2 )
I am trying to use something similar with active record and it appears this isn't possible because it always comes out as:
Code:
SELECT * FROM kb_articles WHERE a_display = 'Y' AND a_id IN '1,2'
My ci code looks like this:
Code:
foreach ($query->result() as $row)
{
$aID.=$row->article_id.',';
}
$aID = rtrim($aID, ', ');
$this->db->from('articles');
$this->db->where('a_display', 'Y');
$this->db->where('a_id IN', $aID);
Does any one have any advice on a work around or maybe an easier way to set this up?