title: Using Where Clause in a Union Query
body: <p>I have a mysql query like this</p>
  
  <pre><code>SELECT id, dpost FROM uid1088_qposts
  UNION
  SELECT id, dpost FROM uid1091_qposts
  WHERE DATE(dpost)='2012-01-01'
  </code></pre>
  
  <p>but the dpost column is a datetime column which stores a data like this</p>
  
  <blockquote>
    <p>2012-01-12 11:55:43</p>
  </blockquote>
  
  <p>the query shows no errors but produces a wrong output</p>
  
  <p><img src="https://i.stack.imgur.com/sPNZ7.png" alt="its a query done in phpMyAdmin"></p>
  
  <p>is there anyway i can union two tables using a where clause in this kind of filtering?
  the two tables does not unite... only the first queried table shows its data and filters a wrong date</p>