title: MySQL: update field with Group By
body: <p>this is an example:</p>
  
  <p>table mysql schema :</p>
  
  <pre>
   id   name   salary
   1    david   20 
   2    jack    30
   3    david   10 
  </pre>
  
  <p><strong>Query:</strong><br /></p>
  
  <pre>
  <code>
  $sql = "UPDATE table SET salary = salary  + 5 WHERE name = 'david' ";
  </code>
  </pre>
  
  <p>I want to added <code>Group By name</code> to avoid duplicate update for <code>david</code>
  How Could I do that?</p>