title: Updating a value from the count of a subquery
body: <p>I'm trying to calculate all the correct answer a user gets and update it in the score table. But it gives me a fun little error.</p>
  
  <pre><code>UPDATE score
  SET end_time = CURTIME(), final_score = COUNT(
      SELECT *
      FROM answered
      WHERE (exam_id = 8 and student_login = 'user' and guessed = 1)
  )
  WHERE exam_id = 8 and student_login = 'user'
  </code></pre>
  
  <p>Error: </p>
  
  <blockquote>
    <p>#1064 - 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 'SELECT * FROM answered WHERE (exam_id = 8 and student_login =
    'user' and gue' at line 3</p>
  </blockquote>
  
  <p>This should be simple enough right? Then what is up with this error? The select works on its own. and the update works without the final_score update.</p>
  
  <p>Thanks for the help!</p>