try like this
<?
$i=0;
while($row_books=mysql_fetch_array($books))
{
if( $i<3)
{
?>
<a href="imagethumb.php?s=<?php echo $row_books['Image']; ?>"><img src="images/buttonname.gif" alt="<?php echo $row_books['Title']; ?>" width="72" height="19" border="0" /></a>
<?
$i++;
}
if($i==3)
{
echo "<tr>";
$i=0;
}
}
?>