title: Update status of record: one record to be active and all other will be inactive
body: <p>I have a <code>enum('Y','N')</code> field in db table with many records hold the status of record active(<code>Y</code>) or inactive(<code>N</code>) . </p>
  
  <p>Only one record can be active at a time. An interface is given to show all the records with their status if it is active then it is showing word <code>Active</code> if it is inactive a submit button provided to make it active with each record.</p>
  
  <p>Right now I am doing with two update commands</p>
  
  <pre><code>update table_name set active="Y" where id=$id
  update table_name set active="N" where id != $id
  </code></pre>
  
  <p>My question is:-</p>
  
  <p>Really Do I needs two update command to execute or Is their any update command to update them in once? </p>