Este sería el codigo que tengo actualmente y funciona... pero solo me muestra los adjuntos del 1er comentario/nota...
Código PHP:
<table width="100%" border="0">
<?php do { ?>
<?php if ($row_notas['nota_id'] != 0) { ?>
<tr>
<td width="70" rowspan="4" valign="top">
<a href="/usuarios/perfil.php?q=<?php echo $row_notas['nota_usuario']; ?>"><img src="/usuarios/imagenes/<?php echo ObtenerImagenUsuario ($row_notas['nota_usuario']); ?>" height="60" /></a>
</td>
<td colspan="2"><a href="/usuarios/perfil.php?q=<?php echo $row_notas['nota_usuario']; ?>"><strong><?php echo ObtenerNombreUsuario ($row_notas['nota_usuario']); ?></strong></a></td>
</tr>
<tr>
<td colspan="2"><?php echo $row_notas['nota_contenido']; ?></td>
</tr>
<tr>
<td valign="bottom">
<!-- adjuntos ... -->
<?php do { ?>
<?php if (($row_notas['nota_id']) == ($row_documentos['documento_nota'])) { ?>
<a href="docs_tareas/<?php echo $row_documentos['documento_archivo']; ?>" target="_blank"><img src="docs_tareas/<?php echo $row_documentos['documento_archivo']; ?>" height="60" /></a>
<?php } ?>
<?php } while ($row_documentos = mysql_fetch_assoc($documentos)); ?>
<!-- ... adjuntos -->
</td>
<tr>
<td colspan="2" valign="bottom"><?php echo $row_notas['nota_fecha']; ?> a las <?php echo $row_notas['nota_hora']; ?>
<?php if ($_SESSION['MM_usuario_ID'] == $row_notas['nota_usuario']) { ?>
· <a href="tarea_imagen_nota.php?q=<?php echo $row_notas['nota_id']; ?>">Adjuntar</a> · <a href="nota_editar.php?q=<?php echo $row_notas['nota_id']; ?>"> Editar</a> · <a href="nota_eliminar.php?q=<?php echo $row_notas['nota_id']; ?>">Eliminar</a>
<?php } ?></td>
</tr>
<tr>
<td colspan="4" valign="top"><hr /></td>
</tr>
<?php } ?>
<?php } while ($row_notas = mysql_fetch_assoc($notas)); ?>
</table>