I want to access record of null in where condition I want to access record of null in where condition codeigniter codeigniter

I want to access record of null in where condition


Try This

    public function fetchDue($rec_type){       $query = $this->db->select('user.user_full_name as consignor,user1.user_full_name as consignee,c.*')     ->from('crossing_cash_memo c')     ->join('ts_users user', 'c.consignor_name=user.user_id', 'left')     ->join('ts_users user1', 'c.consignee_name=user1.user_id', 'left')     ->where(array('c.memo_status' => 'cash_memo', 'c.due_to !=' =>'cash'))     ->order_by('c.lr_no','asc')     ->get();                                 return $query->result();  }


Try this method,I don't table name correctly you change it as yours

 $query =$this->db->query("SELECT * from crossing_cash_memo Left outer join ts_users on `ts_users`.`user_id` = `crossing_cash_memo`.`consignor_name` left outer join ts_users on `ts_users`.`user_id`= crossing_cash_memo.consignee_name where memo_status = 'cash_memo' and where due_to != 'cash' order by lr_no ASC")->result_array(); }