title: Randomly update columns with mysql
body: <p>I'm building a browser game which you can shoot missiles on factories.</p>
  
  <p>This is example of a similar SQL table:</p>
  
  <pre><code>user_ID iron steel metal gold
     1     21    30   39    25
     2      7    10   25    50
  </code></pre>
  
  <p>I need each missile to destroy 1 factory.
  For example I shoot 10 missile, so 10 factories are destroyed. But I need it to have completely randomly and even.
  The problem is if according to this SQL table, if I shoot for example 40 missile on user_ID '2'.
  In best case I destroy 10 factories of each kind. But how can I do it when I don't know if there is enough of each kind?</p>