title: Update a score from player with mysql
body: <p>I have a simple online highscore system for my iphone game, with a mysql database, which has a field rank, name, score and udid (unique device identifier). I don't want to have multiple scores from a udid, and my question is : how can I make sure that the old score is removed and the new one is inserted, with the new highscore.</p>
  
  <p>My code for inserting the score is :</p>
  
  <pre><code>// Insert the score
  
  $retval = mysql_query("INSERT INTO $table(
          udid,
          name,
          score
  
      ) VALUES (
          '$udid',
          '$name',
          '$score'
  
      )",$conn);
  
  if($retval) {
      echo "Inserted score $score for $name";
     }
  </code></pre>
  
  <p>So I want to overwrite the old score and insert the new one.</p>
  
  <p>Thanks for your help,</p>
  
  <p>Cheers, Joe</p>
  
  <p>EDIT :</p>
  
  <p>I am not a php programmer, so if you want, please provide a simple example, thanks in advance!</p>