Codeigniter select query with AND and OR condition


I want a Codeigniter select query from a table with three conditions in .

1. wrk_fld_exc = 140
2. wrk_cs_sts = Open
3. wrk_dlvrd_sts = Delivered OR wrk_cl_sts = Success

The third condition is an AND condition contains OR condition.
First and second is And condition.

Best Solution

You can code it like this:

       $where = '(wrk_dlvrd_sts="open" or wrk_cl_sts = "Success")';
Related Question