mira,mejor guarda lore resultados de tu consulta en un array y luego vas generando las diferentes filas. Algo asi:
Código:
<?
$aux=0;
while($item = mysql_fetch_assoc($items)) {
$item_id[$aux] = $item["id"];
$item_descripcion[$aux] = $item["descripcion"];
$item_precio[$aux] = $item["precio"];
$item_img[$aux] = $item["img"];
$img_file[$aux] = "img2/" . $item_id[$aux] . ".jpg";
$aux++;
}
?>
<table>
<tr>
<td>Nombre</td><td>Precio</td><td>Imagen</td>
</tr>
<?
for ($i=0; $i<$aux; $i++){
?>
<tr>
<td><?= $item_descripcion[$i] ?></td>
<td><? = $item_precio[$i] ?></td>
<td> <? if($item_img[$i] != "") { ?><img name="img_file_<?= $item_id[$i] ?>" src="<?=$img_file[$i] ?>"> <? } ?> </td>
</tr>
<?
} // esta llave cierra el for
?>
</table>