title: Passing 2 strings through array to the where clause in codeigniter
body: <p>I want to send 2 strings through array from controller to model and get the results from db, but there is a problem I'm facing.</p>
  
  <p>My controller is like:</p>
  
  <pre><code>$data = array();
  if($query = $this-&gt;authors_model-&gt;get_authors_list(array('author_Type' =&gt; array('admin', 'author'))))
  {
      $data['authors'] = $query;
  }
  </code></pre>
  
  <p>My Model :</p>
  
  <pre><code>function get_authors_list($options = array())
  {        
  
      if(isset($options['author_Type']))
      $this-&gt;db-&gt;where('author_Type', $options['author_Type']);
  
      $this-&gt;db-&gt;order_by('author_Id', 'ASC');
      $query = $this-&gt;db-&gt;get('mg_authors');
  
      return $query-&gt;result();
  }
  </code></pre>
  
  <p>and the error I'm getting:</p>
  
  <blockquote>
    <p>A PHP Error was encountered</p>
    
    <p>Severity: Notice</p>
    
    <p>Message: Array to string conversion</p>
    
    <p>Filename: database/DB_active_rec.php</p>
    
    <p>Line Number: 427</p>
  </blockquote>
  
  <hr>
  
  <blockquote>
    <p>Error Number: 1054</p>
    
    <p>Unknown column 'Array' in 'where clause'</p>
    
    <p>SELECT * FROM (<code>mg_authors</code>) WHERE <code>author_Type</code> = Array ORDER BY
    <code>author_Id</code> ASC LIMIT 15</p>
    
    <p>Filename: D:\xampp\htdocs\sport\system\database\DB_driver.php</p>
    
    <p>Line Number: 330</p>
  </blockquote>