I want a CodeIgniter select query from a table with three conditions.
wrk_fld_exc = 140
wrk_cs_sts = 'Open'
wrk_dlvrd_sts = 'Delivered' OR wrk_cl_sts = 'Success'
The third condition is an AND condition contains an OR condition. First and second is an AND condition.
You can code it like this:
$this->db->where('wrk_fld_exc',140);
$this->db->where('wrk_cs_sts','open');
$where = '(wrk_dlvrd_sts="open" or wrk_cl_sts = "Success")';
$this->db->where($where);