Código PHP:
<table width="950" border="0">
<tr>
<td width="87"><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, 0, $queryString_Recordset1); ?>"><img src="imagenes/First.gif" /></a>
<?php } // Show if not first page ?></td>
<td width="378"><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0, $pageNum_Recordset1 - 1), $queryString_Recordset1); ?>"><img src="imagenes/Previous.gif" /></a>
<?php } // Show if not first page ?></td>
<td width="389" align="right"><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>"><img src="imagenes/Next.gif" /></a>
<?php } // Show if not last page ?></td>
<td width="78" align="right"><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, $totalPages_Recordset1, $queryString_Recordset1); ?>"><img src="imagenes/Last.gif" /></a>
<?php } // Show if not last page ?></td>
</tr>
</table>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>