im an noobe, but i have done thumbnail script, so i think i may be able to help you.
the way i did mine was.
set up table im mysql called images or whatever.
i have pic_id, pic_area, pic_descrip, pic_path, thum_path.
the pic_path and thum_path hold the address's of the images.
e.g: http://localhost/images/whatever.jpg
then ill paste my code in, and you may be able to apply it to your own. The code automatically formats the thum images into a table for you.
<?php
$conn= @mysql_connect("localhost","****","*****");
or die("Err:Conn");
$rs= @mysql_select_db("kriminalyouth", $conn)
or die("Err:Db");
$sql = "select * from images";
$result = mysql_query($sql);
$num_results = mysql_num_rows($result);
echo "<images>\n";
echo "<table border='1' cellpadding='0' cellspacing='6' bordercolor='#000000'>";
for($i=0;$i<$num_results;$i++)
{
$row = mysql_fetch_array($result);
if(($i%6)==0)
{
echo "<tr>\n";
}
echo "<td>";
echo "<a href=\"display.php?file=".$row['pic_path']."&pic_descrip=". $row['pic_descrip']."&pic_area=" . $row['pic_area']."\"><img src=\"".$row['thum_path']."\" border='0'></a>";
echo "</td>\n";
if (($i%6)==5)
{
echo "</tr>\n";
}
}
echo "</table>\n";
?>
---------------------------
hope this helps.