Here is my code that I have for my page (photos.php) that displays the images.
<?php require_once("config/include/utils.runtime6.php") ?>
<?php require_once("config/include/mysql.runtime6.php") ?>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<link rel="STYLESHEET" type="text/css" href="style.css">
<?php $photos = WrapMySQLDatabaseResults("album", "select * from photos where ID = " . $GLOBALS["ID"] . "", "block=2997","photos");
?>
<table width="200" border="1" cellspacing="2" cellpadding="0">
<? php $photos->MoveFirst(); ?>
<?php $photos->Move($photos->FirstRecordOnPage() - 1); ?>
<?php $rowCounter620 = 0; ?>
<?php while (!$photos->EOF() && $rowCounter620 < 999) { ?>
<tr>
<?php $cellCounter620 = 0; ?>
<?php while (!$photos->EOF() && $cellCounter620 < 3) { ?>
<td>
<div align="center">
<img src='<?php echo mapPath($photos->Value("file"), "photos/")?>' alt="" height="283" width="224" border="0"><br><?php echo $photos->Value("caption")?></div>
</td>
<?php $cellCounter620++; ?>
<?php $photos->MoveNext(); ?>
<?php } ?>
</tr>
<?php $rowCounter620++; ?>
<?php } ?>
</table>
Is this what you are asking for?