title: PHP Mysql Update issue
body: <p>I'm having an issue that I can't quite figure out. I have a bit of code that allows a user to pick, let's say, which type of fruit is their favourite. If they've previously selected 'apples' as their favourite and want to change it to 'oranges' - the script performs well.</p>
  
  <p>But if they select 'apples' when they've already selected 'apples' the MYSQL Update call breaks down and returns an error. It's like it won't write over itself with the same data, that the new value has to be unique. I'm at a loss.... Here's the update bit:</p>
  
  <pre><code>    // UPDATE THEIR FRUIT SELECTION...
      $q = "UPDATE account SET fav_fruit='" . $row['fruit'] . "' WHERE act_id=$act_id LIMIT 1";       
      $r = @mysqli_query ($dbc, $q);
      if (mysqli_affected_rows($dbc) == 1) { // If it ran OK.
             echo 'success!';
  
      } else { 
          echo 'oops!';
      }
  </code></pre>
  
  <p>Again, this works so long as the new selection and what's in the database aren't the same. If they are: I get the oops! error.</p>