title: How to do the WHERE clause on a UPDATE statement that uses a JOIN?
body: <p>In this example the field username is inside the users table and the field email is in the profiles table.</p>
  
  <pre><code>UPDATE `profiles`
  JOIN `users` ".
  SET `username` = 'foo',
  `email` = 'bar@aol.com'
  WHERE users.user_id = '1'
  </code></pre>
  
  <p>In this where clause I am using users.user_id, but this causes all fields in the profile table to be updated with the email "bar@aol.com". What is the syntax to specify profiles.user_id in addition to the users.user_id in the WHERE clause?</p>