Welcome Guest, Not a member yet? Register   Sign In
ActiveRecord - can a "where" clause be an array of OR elements
#1

[eluser]venksster[/eluser]
ok this is unclear. let me expain...this is what i intend to do...


Table USERS has
UID,uname

Now,
$uid=1;
$this->db->select('uname');
$users_db = $this->db->get_where('users',array('UID'=>$uid));

gives me the name for UID=1.

NOW, lets say
uid=array(“1”,”2”,”3”,“4”);
$this->db->select('uname');
$users_db = $this->db->get_where('users',?????);

How do i use the where clause or any other clause to get all unames for UIDs from an array?

Thanks for your help!


Messages In This Thread
ActiveRecord - can a "where" clause be an array of OR elements - by El Forum - 12-27-2008, 07:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB