title: Loop a where clause?
body: <p>I specify a where clause:</p>
  
  <pre><code>$this-&gt;model = $model-&gt;where('published', '=', '1');
  $this-&gt;model-&gt;get();
  </code></pre>
  
  <p>The above works fine, giving a query log of:</p>
  
  <pre><code>select * from `products` where `published` = ?"
  </code></pre>
  
  <p>But I need to loop through where clauses from an array.</p>
  
  <pre><code>$arr = [['published', '=', '1'], ['id', '=', '1']];
  foreach ($arr as $key =&gt; $value) {
      $model = $model-&gt;where($value);
  }
  $model-&gt;get();
  </code></pre>
  
  <p>But with the above I get a column not found. Unknown column '0' in 'where clause'.</p>
  
  <p>Where am I going wrong?</p>
  
  <p>Further to this, if I just pass in the entire array, it works:</p>
  
  <pre><code>$model = $model-&gt;where($arr);
  </code></pre>
  
  <p>Giving a query log of:</p>
  
  <pre><code>"select * from `products` where (`published` = ? and `id` = ?)"
  </code></pre>
  
  <p>But the where clauses are in brackets... why?</p>