title: UPDATE SET CASE with an INNER JOIN?
body: <p>I'm trying to update a field in one of our relational tables. The table in question is a user-skill relationship table. The field I'm trying to update is the proficiency field.</p>
  
  <p>I have an array in PHP with the name of the skill as the key and the proficiency as the value.</p>
  
  <p>Here's the SQL Statement I'm running.</p>
  
  <pre><code>UPDATE rus 
  SET proficiency = CASE 
      WHEN ls.name = 'Objective-C' THEN 'Beginner' 
      END 
  FROM rel_users_li_skills rus INNER JOIN li_skills ls ON ls.id = rus.skill_id 
  WHERE rus.user_id = 3852
  </code></pre>
  
  <p>The PHP array is enumerated through to add extra <code>WHEN ls.name = 'skill-name' THEN 'proficiency'</code> statements in the CASE statement.</p>
  
  <p>The problem I'm having is the following :</p>
  
  <p>check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM rel_users_li_skills rus INNER JOIN li_skills ls ON ls.id = rus.skill_id WHE' at line 1</p>
  
  <p>I'm stumped on this one. I've found a couple of SO posts and forums already that seem to use the same syntax and have no problems.</p>