title: How do I make a SQL query using an array's multiple keys/values?
body: <p>I have an array with keys and values like this:</p>
  
  <pre><code>Array ( [1] =&gt; 0 [3] =&gt; 0 )
  </code></pre>
  
  <p>I want to call a database where question_id = 1 and it's value is 0 and combine that with a query of question_id = 3 and it's value of 0. I am using Codeigniter.</p>
  
  <p>I've tried:    </p>
  
  <pre><code>foreach($array as $key=&gt;$value){
      $this-&gt;db-&gt;where('question_id', $key);
      $this-&gt;db-&gt;where('value', $value);
      $this-&gt;db-&gt;from('movies_values');
      $query = $this-&gt;db-&gt;get();
      $res = $query-&gt;result();
      print_r($res);
      array_push($main_array,$res);
  }
  </code></pre>