title: Select Row with CodeIgniter Active Record
body: <p>I want to build a query like</p>
  
  <pre><code>SELECT username from users
   WHERE login_attempts &gt; 3 AND last_attempt_time &lt; 24 (hours).
  </code></pre>
  
  <p>I have 2 questions to build the above query.</p>
  
  <ol>
  <li><p>I'm storing the date in last_attempt_time in DATETIME format (2011-06-16 10:29:23)
  Can I directly select some row which has time difference less than 24 hours from now? (OR do I have to select a row, and then check with for example PHP the time difference? )</p></li>
  <li><p>How can I write this query using CodeIgniter Active Record? (Do I need to use get_where?) I could not find any related example in their documentation.</p></li>
  </ol>
  
  <p>Thanks.</p>