This is my while loop from my project :
<?php
$select = "SELECT * FROM nk_showcase";
$query = $db->rq($select);
while ($user = $db->fetch($query)) {
?>
<div class="index">
<a href="details.php?id=<?php echo $user['id']; ?>"><img width="200" height="171" alt="<?php echo $user['title']; ?>" src="<?php echo $url; ?>/images/niagakit/<?php echo $user['thumb']; ?>"/></a>
<h3><a href="<?php echo $url; ?>/"><?php echo $user['title']; ?></a></h3>
<p><a href="<?php echo $url; ?>/"><?php echo $user['url']; ?></a></p>
</div>
<?php } ?>
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?