title: Mysqli update query doesn't work
body: <p>So I'm trying to build a kind of update email function, and the part that should put it into the db looks like this</p>
  
  <pre><code>&lt;?php $emailfrom = $_POST['emailfrom'];
          $emailto = $_POST['emailto'];
          $query = sprintf('UPDATE `users` SET `email`="%s" WHERE `email`="%s"`',
          mysqli_real_escape_string($db, $emailfrom),
      mysqli_real_escape_string($db, $emailto));
          mysqli_query($db, $query);    
  </code></pre>
  
  <p>The problem is that the row don't update... And I need help in knowing why, as I'm not so well experienced with mysql, used other dbs mainly earlier</p>