title: updating records with prepared statements, checking if update worked
body: <p>I have a query that updates a record on my database, it works fine but i wanted to know how to check if the update has happened so i can return true and display the right message?</p>
  
  <p>Now i know with a SELECT query i can do:</p>
  
  <pre><code>if(stmt-&gt;fetch())
  </code></pre>
  
  <p>If that is true i return true and saying "records found" but i haven't got a clue how to do it for an update query?</p>
  
  <p>Anyone know how to?</p>
  
  <pre><code>$query = "UPDATE user
              SET password = ?
              WHERE email = ?";
  
  if($stmt = $conn-&gt;prepare($query)) 
  {
      $stmt-&gt;bind_param('ss', $pwd, $userEmail);
      $stmt-&gt;execute();
  
      //Check if update worked
  }
  </code></pre>
  
  <p>Thanks for the help. </p>