title: php mysql update limit
body: <p>I want to update mysql database, where <code>directory = 0</code>, and just update <code>5 of records</code> which value <code>0</code> to <code>art</code>.</p>
  
  <p>for explain:</p>
  
  <pre><code>id    |   directory
  1     |   fashion
  2     |   0    //update here into 'art'
  3     |   travel
  4     |   fashion
  5     |   0    //update here into 'art'
  6     |   0    //update here into 'art'
  7     |   travel
  8     |   0    //update here into 'art'
  9     |   0    //update here into 'art'
  10    |   0    //this is 6th record, do not update, leave the value as '0'.
  11    |   fashion
  </code></pre>
  
  <p>Is this update code right? thanks. </p>
  
  <pre><code>mysql_query("UPDATE articles SET directory = 'art' WHERE directory ='0' LIMIT 5");
  </code></pre>