title: How to limit items from while loop
body: <p>This is my while loop from my project :</p>
  
  <pre><code>&lt;?php
     $select = "SELECT * FROM nk_showcase";
     $query = $db-&gt;rq($select);
     while ($user = $db-&gt;fetch($query)) {
  ?&gt;
  
      &lt;div class="index"&gt;
          &lt;a href="details.php?id=&lt;?php echo $user['id']; ?&gt;"&gt;&lt;img width="200" height="171" alt="&lt;?php echo $user['title']; ?&gt;" src="&lt;?php echo $url; ?&gt;/images/niagakit/&lt;?php echo $user['thumb']; ?&gt;"/&gt;&lt;/a&gt;
          &lt;h3&gt;&lt;a href="&lt;?php echo $url; ?&gt;/"&gt;&lt;?php echo $user['title']; ?&gt;&lt;/a&gt;&lt;/h3&gt;
          &lt;p&gt;&lt;a href="&lt;?php echo $url; ?&gt;/"&gt;&lt;?php echo $user['url']; ?&gt;&lt;/a&gt;&lt;/p&gt;
      &lt;/div&gt;
  
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>As you already know, this while loop will loop for all items they found in my database, so my quuestion is, how to limit this loop only for 10 items only from my database and how to rotate that items every refresh?</p>