title: WHERE Clause syntax
body: <p>What's up with my sysntax, I can't get it right. Is there a better way?</p>
  
  <pre><code>&lt;?
              $uid = $_GET["uid"];
              $month= $_GET["month"];
              $year = $_GET["year"];
              $query = "SELECT taskname,uid,month,year, SUM(tasktime) FROM tictoc WHERE uid = $uid, month = $month, year = $year GROUP BY taskname"; 
  
              $result = mysql_query($query) or die(mysql_error());
  
              // Print out result
              while($row = mysql_fetch_array($result)){
                  echo "&lt;br /&gt;";
                  echo "Total ". $row['taskname']. " = &lt;strong&gt;". $row['SUM(tasktime)']."&lt;/strong&gt;";
                  echo "&lt;br /&gt;";
              }
              ?&gt;
  </code></pre>
  
  <p>Error is:</p>
  
  <pre><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 ' month = 'Aug', year = '2012' GROUP BY taskname' at line 1
  </code></pre>