title: Codeigniter multiple where condition
body: <p>I have a problem i only want to select a specific row/s with user_id = $this->session->id , status = 4 hours, 8 hours and work from home. </p>
  
  <p>EDIT:
  all my status is </p>
  
  <ul>
  <li><p>Work From Home</p></li>
  <li><p>8 hours</p></li>
  <li><p>4 hours</p></li>
  <li><p>Vacation Leave</p></li>
  <li><p>Sick Leave</p></li>
  </ul>
  
  <p>but what happened is it only returns all the Work From Home of the specific user_id and not included the 4 hours and 8 hours status</p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>$order_by = "id desc";
  $where = ['user_id' =&gt; $this-&gt;session-&gt;id,'status' =&gt; '4 hours', 'status' =&gt; '8 hours','status' =&gt; 'Work From Home'];
  $this-&gt;Crud_model-&gt;fetch('record',$where,"","",$order_by);
  </code></pre>
  
  <p><strong>MODEL</strong></p>
  
  <pre><code>public function fetch($table,$where="",$limit="",$offset="",$order=""){
      if (!empty($where)) {
          $this-&gt;db-&gt;where($where);   
      }
      if (!empty($limit)) {
          if (!empty($offset)) {
              $this-&gt;db-&gt;limit($limit, $offset);
          }else{
              $this-&gt;db-&gt;limit($limit);   
          }
      }
      if (!empty($order)) {
          $this-&gt;db-&gt;order_by($order); 
      }
  
      $query = $this-&gt;db-&gt;get($table);
      if ($query-&gt;num_rows() &gt; 0) {
          return $query-&gt;result();
      }else{
          return FALSE;
      }
  }
  </code></pre>