• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.