title: How to check if the row has been updated?
body: <p>How to return a boolean if the record has been updated on the database?</p>
  <h2>Example:</h2>
  <pre><code>try {
    $SQL = &quot;UPDATE addressbook SET valid = '0' WHERE id = :id&quot;;
    $query = $this-&gt;db-&gt;prepare($SQL);
    $query-&gt;bindValue(&quot;:id&quot;, $id);
    $query-&gt;execute();
  
    //How do I know if record has been updated? 
  } catch (PDOException $e) {
    $j['success'] = 'false';
    echo json_encode($j);
    return;
  }
  </code></pre>