mysql - how to write query for 3 where_in() in codeigniter -


i have query run don't how write in codeigniter

here query

select id,contact,firstname,email  `user`  `id` in(select id                `hr`                `hr_id` in(select hr_id                                 `admin_hr`                                 id_admin_hr = 8)               ) , `id_category` =1 

you can add sub-query part in where() method, try this

$this->db->select("id,contact,firstname,email")         ->where("id in(select id `hr` `hr_id` in(select hr_id `admin_hr` id_admin_hr = 8))")         ->where("id_category", 1)         ->get("user") 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -