Here is a good way to write what you need while pulling the image locations from the DB.
<?
//conntect to db and all that jazz
mysql_connect('localhost', 'username', 'password') or die(mysql_error());
mysql_select_db('dbname') or die(mysql_error());
//lets get those files names
$query = mysql_query("SELECT image FROM table LIMIT 0,15") or die(mysql_error());
//I just told the DB to pull the image field info from the first 15 entries
$count = 1; //set the count
echo "<table>"
while($image = mysql_fetch_array($query)){ // do this while query runs
if($count%2==0){ echo "<tr>";}
echo "<td><img src='images/".$image['image']."' height='200' width='200'></td>";
if($i%2==1 || $i==$num-1){ echo "</tr>";}
$count++; // increment count
}//end while
echo "</table>";
?>