Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to use or_where and where in codeigniter
    text
    copied!<p>I am facing a problem when using active record or_where<br> how i do or only for one particular field i.e meeting_status</p> <pre><code>$this-&gt;db-&gt;_protect_identifiers=false; $this-&gt;db-&gt;select("g.category_id,f.doc_type_id,g.category_name,f.doc_type_name,c.meeting_name_id, c.meeting_name as mn, d.meeting_type_id, d.meeting_type_name, e.venue_id, e.venue_name, u.*, (select count(*) from tbl_meeting_decisions where meeting_id=u.meeting_id and record_status= 'ACTIVE') as `meeting_decision`, (select count(*) from tbl_meeting_actions where meeting_id=u.meeting_id and record_status= 'ACTIVE') as `meeting_action`, (select count(*) from tbl_meeting_actions where meeting_id=u.meeting_id and action_status='OPEN' and record_status= 'ACTIVE') as `meeting_close_action`"); $this-&gt;db-&gt;from('tbl_meeting_plans u'); $this-&gt;db-&gt;join('tbl_meeting_names c', 'c.meeting_name_id = u.meeting_name'); $this-&gt;db-&gt;join('tbl_meeting_types d', 'd.meeting_type_id = u.meeting_mode_id'); $this-&gt;db-&gt;join('tbl_meeting_venue e', 'e.venue_id = u.venue_id '); $this-&gt;db-&gt;join('tbl_document_types f', 'f.doc_type_id = u.meeting_type_id '); $this-&gt;db-&gt;join('tbl_categories g', 'g.category_id = u.meeting_category_id '); $this-&gt;db-&gt;where(array('u.meeting_type_id'=&gt;$str2,'u.meeting_category_id'=&gt;$str1,'u.meeting_status'=&gt;'Planning','u.record_status'=&gt;'ACTIVE' )); $this-&gt;db-&gt;or_where(array('u.meesting_status'=&gt;'Meeting Updated' )); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload