[eluser]fuji2009[/eluser]
Hello guys i have a problem: how do that :
Code:
SELECT `user1_id` FROM (`relationship`) WHERE (`user2_id` = '2' AND `type` = 'friend' AND `valide` = '1') OR (`usr2_id` = '2' AND `type` = 'coeur' AND `valide` = '1')
I try this but this return me :
Code:
$where = array('user2_id'=>$user_login_id , 'type'=>'friend' , 'valide'=>1);
$this->db->where($where);
$where2 = array('user2_id'=>$user_login_id , 'type'=>'coeur' , 'valide'=>1);
$this->db->or_where($where2);
this return :
Code:
SELECT `user1_id` FROM (`relationship`) WHERE `user2_id` = '2' AND `type` = 'friend' AND `valide` = 1 OR `user2_id` = '2' OR `type` = 'coeur' OR `valide` = 1
it s not same
Thanks you