 chaining you can create more complex where clauses, using and, or and nesting</p>

					<pre class="php"><code>// complex where clause
Model_Article::query()
  -&gt;where('author', '=', 16)
  -&gt;and_where_open()
      -&gt;where('date', '&lt;', time())
      -&gt;or_where('draft', '=', 1)
  -&gt;and_where_close();

// creates WHERE `author` = 16 AND (`date` &lt; 1348404127 OR `draft` = 1)
</code></pre>
					<p class="note">
						To create a nested OR, use <kbd>or_where_open()</kbd> and <kbd>or_where_clo