Welcome Guest, Not a member yet? Register   Sign In
active record // where() or_where_in() question
#1

[eluser]jurlan[/eluser]
Hi all,

It might be a stupid question but how do I put the following part of a query :
Code:
WHERE((i.Nationality=2) OR (i.ID IN (4356, 77071))

in the active record form with
Code:
$this->db->where('i.Nationality', 2)->or_where_in('i.ID', $numbers);

where $numbers is predefined array containing the 2 numbers.

My example doesn't produce the outer () .. is there a way to do it?

Thanks a lot
/jurlan


Messages In This Thread
active record // where() or_where_in() question - by El Forum - 10-25-2012, 05:03 AM
active record // where() or_where_in() question - by El Forum - 10-25-2012, 05:08 AM
active record // where() or_where_in() question - by El Forum - 10-25-2012, 05:35 AM
active record // where() or_where_in() question - by El Forum - 10-25-2012, 08:48 PM
active record // where() or_where_in() question - by El Forum - 10-26-2012, 08:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB