title: With PDO, how can I make sure that an UPDATE statement was successful?
body: <p>It seems that for an INSERT statement, one can use <code>if (isset($connect-&gt;lastInsertId()))</code> in order to check whether the INSERT statement was successful. (Please correct me if I'm wrong.)</p>
  
  <p>But for an UPDATE statement, how can I know if it was successful?</p>
  
  <p>For example, I have  basic one like that:</p>
  
  <pre><code>$statement=$connect-&gt;prepare("UPDATE users SET premium='1' WHERE userid=?");
  $statement-&gt;execute(array($id));
  </code></pre>
  
  <p>Thanks a lot in advance. Regards</p>