Welcome Guest, Not a member yet? Register   Sign In
Problem with double join the same table with Active Record
#2

[eluser]amatotax[/eluser]
Youupiee made it Big Grin

Code:
$this->db
->select('users.id, rel.sender, rel.recipient')
->from('users')
->join('relations as rel', 'rel.sender = users.id OR rel.recipient = users.id')
->where(array('users.id' => $uid, 'rel.is_accepted' => 1));


Messages In This Thread
Problem with double join the same table with Active Record - by El Forum - 12-12-2012, 05:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB