Aggregated query without GROUP BY : <p>This query seems to work perfect on my older machine. However, on my new machine with MySQL 5.7.14 and PHP 5.6.25 it seems to throw an error:</p>

<blockquote>
  <p>Fatal error: Uncaught exception 'PDOException' with message
  'SQLSTATE[42000]: Syntax error or access violation: 1140 In aggregated
  query without GROUP BY, expression #1 of SELECT list contains
  nonaggregated column 'pixel_perfect.users.id'; this is incompatible
  with sql_mode=only_full_group_by' in C:\wamp64\www</p>
</blockquote>

<p>Here is what my query looks like:</p>

<pre><code>$sql="SELECT id, password, COUNT(id) AS count FROM users WHERE email = :email LIMIT 1";

$stmt=$db-&gt;prepare($sql);
$stmt-&gt;bindValue(':email', $email);
$stmt-&gt;execute();
</code></pre>

<p>Why am I getting this error now and what do I do to resolve it painlessly.</p>
