title: On duplicate key - update multiple tables
body: <p>How can I update multiple tables with an insert? What I'm trying here doesn't work. Also, how can I add/subtract <strong>u.score</strong> with the difference between a vote variable and the existing v.weight?</p>
  
  <pre><code>INSERT INTO votes (userid, publication_id, weight) VALUES (1,2,3)
              ON DUPLICATE KEY 
                UPDATE votes v, users u
  
  
              SET v.weight=1
                WHERE v.userid=1
                --TODO: update u.score
  </code></pre>