title: QSlQuery fails for MySQL select statement
body: <p>I have the following MySQL query used in my Qt application:</p>
  
  <pre><code>query.prepare(QString("SELECT productName, value, COUNT(value), SUM(value)"
                    "FROM tblmystock"
                    "WHERE time&gt;=\'%1\' AND time&lt;=\'%2\'"
                    "GROUP BY productName, value").arg(startDateTime, endDateTime));
  </code></pre>
  
  <p>I get the following error: <code>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near'&gt;='2012-04-24 00:00:00' AND time&lt;='2012-04-24 23:59:59:59' GROUP BY productName' at line 1 QMYSQL: Unable to execute query</code></p>
  
  <p>Even when I try to bindValues, it fails with the same error.</p>
  
  <p>But when I execute the same query on the MySQL prompt like below, it works fine:</p>
  
  <pre><code>mysql&gt; SELECT productName, value, COUNT(value), SUM(value) FROM tblmystock WHERE time&gt;='2012-04-24 00:00:00' AND time&lt;='2012-04-25 23:59:59' GROUP BY productName, value;
  </code></pre>
  
  <p>Does anybody know a workaround for this?</p>