Welcome Guest, Not a member yet? Register   Sign In
Active record where/or_where question?
#1

[eluser]JasonS[/eluser]
This is what I have at the moment.

Code:
$this->db->where('id', $id);
$this->db->or_where('winner', $this->session->userdata('id'));
$this->db->or_where('author', $this->session->userdata('id'));

I want to look for the following

id is equal to $id
where user is either winner or author

How do I do this with the active record class?


Messages In This Thread
Active record where/or_where question? - by El Forum - 06-25-2008, 02:48 AM
Active record where/or_where question? - by El Forum - 06-25-2008, 03:05 AM
Active record where/or_where question? - by El Forum - 06-25-2008, 03:06 AM
Active record where/or_where question? - by El Forum - 06-25-2008, 03:12 AM
Active record where/or_where question? - by El Forum - 06-25-2008, 03:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB