title: SQLite select records from last 24 hour
body: <p>I have this struct of data stored in an SQLite DB:</p>
  
  <p><a href="https://i.stack.imgur.com/xDWkY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xDWkY.png" alt="stored datas"></a></p>
  
  <p>I'm trying to get the records from the past 24 hours in a php code.</p>
  
  <p>I use the following query that I found at similar questions:</p>
  
  <pre><code>SELECT temp FROM Sysstat 
  WHERE when &gt;= date('now', '-1 days') AND when &lt; date('now')
  </code></pre>
  
  <p>But it doesn't seem to work and gives error:</p>
  
  <blockquote>
    <p>Warning: SQLite3::prepare(): Unable to prepare statement: 1, near "when": syntax error in..</p>
  </blockquote>
  
  <p>Anyone could give me some advice?</p>