Tengo una pagina HTML, que ejecuta una consulta y levanta datos, como puedo hacer para que solo se imprima esa consulta.
(hay codigo HTML y PHP es solo de ejemplo para tene mejor la idea)
Código HTML:
...<table width="450" border=0>
<tr bgcolor="#A7231C" class="textotitulo">
<td width="100" height="20"><div align="left">Fecha</div></td>
<td width="150"><div align="left">Nombre</div></td>
<td width="100"><div align="left">Cedula</div></td>
<td width="50"><div align="left">Telefono</div></td>
<td width="50"><div align="left">Importe</div></td>
<td width="50"><div align="left">Ver</div></td>
</tr>
<tr><?php while ($row = mysql_fetch_assoc($result)){;?>
<td width="100" height="20" style="padding-left:5px"><div align="left">
<?php
$result1=mysql_query("SELECT fecha FROM $name_tb[compras] where nro_compra='".$row['id']."'");
$row1 = mysql_fetch_assoc($result1);
echo $row1['fecha'];
?>
</div></td>
<td width="150" height="20" style="padding-left:5px"><div align="left">...
Si tiene alguna idea de donde empezar gracias, saludos