title: Turn string from query into integer for another query
body: <p>Basically, I have a query that gets a number from a database, I then need to take the number, turn it into an integer so I can add 1 to it, then query it again to update the database.</p>
  
  <p>Basically, I want it so every time someone clicks it updates the database number to be the same number + 1.</p>
  
  <p>Code:</p>
  
  <pre><code>$id = $_POST['id'];
  $curr = mysqli_query($mysqli, "SELECT `likes` FROM savage WHERE `id` = '$id'");
  $curr2 = intval($curr) + 1;
  mysqli_query($mysqli, "UPDATE savage SET `likes`='$curr2' WHERE `id`='$id'");
  </code></pre>
  
  <p>I attempted to use intval? I was just making an attempt.</p>