title: Mysql virtual column in WHERE
body: <p>I have the following MySQL Query:</p>
  <pre><code>SELECT from_unixtime( `lastlogin` ) AS `last`
  FROM `players` WHERE `lastlogin` &lt;&gt; 0 AND `last` &lt; '2012-10-01 00:00:00';
  </code></pre>
  <p>And I get the following result:</p>
  <h1>1054 - Unknown column 'last' in 'where clause'</h1>
  <p><code>last</code> cannot be used in the WHERE statement because this is ofcourse a virtual column and doesn't exist. &quot;lastlogin&quot; contains an UNIX Timestamp.</p>
  <p>However is there a proper way to use a virtual column in a where statement?</p>
  <p>Thanks for your help.</p>