mysql_query
zwraca identyfikator zasobu
, powinieneś pobrać tablicę :
$results = mysql_query("select * from classpics");
while($row = mysql_fetch_array($results)){
echo '<td valign="middle" align="center"><a class="neutral" href="../images.php?id=' . $row['id'] . '"><img src="'. $row['thumbs'].'" border="0" /></a>';
}