title: Using CodeIgniter get_where to chain 'and' and 'or' statements
body: <p>I am trying to access data in a local database (on my vm), and I have to use CodeIgniter's query building classes to get the data. I have this query which I have figured out in sql:</p>
  
  <pre><code>select message, created
  from logs
  where username = 'user'
      and (
          created &gt; '1487695796'
          and created &lt; '1487782196'
          )
      and (
          message = 'login failure'
          or message = 'login success'
          or message = 'log out'
          )
  order by created asc
  </code></pre>
  
  <p>My biggest question is how can I chain the 'and's and 'or's in a get_where statement in CodeIgniter? I have looked and saw I could put things in an array for the 'WHERE' portion, but I haven't seen how I can place things in for the 'or's (since everything in the array is an 'and'. I MUST use get_where (can't do 'get->where'), so if there is a way to do it, please let me know!</p>
  
  <p>Thank you for taking the time to read my question!</p>