title: SELECT MAX query issue interval
body: <p>I want to get the highest value in the last 1 day, but the query is not working.
  (date / time columns formatted by date).
  The data I want to query is in multiple headers.</p>
  <pre><code>SELECT sign, date, price, MAX(price) as maxp FROM table WHERE datetime &gt;= NOW() - INTERVAL 1 DAY
  </code></pre>
  <p>my full query;</p>
  <pre><code>$que = $conn-&gt;mysql_query(&quot;SELECT sign, date, MAX(price) as maxp FROM table WHERE date &gt;= (NOW() - INTERVAL 1 DAY) group by sign, date&quot;); 
  
  $row = mysql_fetch_array($que); { 
  
  ?&gt;
  
  &lt;?php
  foreach ($que as $row) {
  $newQuery = &quot;UPDATE tableb SET `daymax`='&quot;.$row[&quot;maxp&quot;].&quot;' where `sign`='&quot;.$row[&quot;sign&quot;].&quot;' &quot;;
  mysqli_multi_query($conn, $newQuery)
  
  ?&gt;
  </code></pre>