title: mysql update table and return all updated records
body: <p>I need to update a mysql table and then return a list of all the id's and names of the fields that were updated.Given my table structure:</p>
  
  <pre><code>********************    
  tbl_books
  ********************
  id - int(11)
  bookname -varchar(100)
  status - varchar(100)
  </code></pre>
  
  <p>Given tbl_books has following rows:</p>
  
  <pre><code> id: 1
   bookname: 'Midsummer Night Dream'
   status: 'Active'
  
   id: 2
   bookname: 'Another book name'
   status: 'Inactive'
  
   id: 3
   bookname: 'So fine'
   status: 'Active'
  </code></pre>
  
  <p>I need to update all the rows that show status = 'Active', set status='Disabled' and return the id's and bookname's as the result. I know the first part of the update query:</p>
  
  <pre><code> UPDATE tbl_books
   SET status = 'Disabled'
   WHERE status = 'Active'
  </code></pre>
  
  <p>How do I get all the values that were updated, so that my return result of updated rows would be like so:</p>
  
  <pre><code>id: 1
  bookname: 'Midsummer Nights Dream'
  
  id: 3
  bookname: 'So fine'
  </code></pre>