title: SELECT gives old values after UPDATE
body: <p>I get value from the table, change it and update the value in the table. After that I try to select this value from the table, but it gives old value that was before updating. In the phpmyadmin I see that value was changed. I can't see what is wrong. </p>
  
  <pre><code>require_once('conn.php');
  $query = "SELECT first FROM vote WHERE id = 1";
  $result = mysqli_query($conn, $query);
  $value = $result-&gt;current_field;
  echo $value."&lt;br&gt;";
  $newvalue = $value + 1;
  echo $newvalue;
  
  $sql = "UPDATE vote SET first = ".$newvalue." WHERE id = 1";
  $do = mysqli_query($conn, $sql);
  $conn-&gt;close();
  </code></pre>