Ver Mensaje Individual
  #3 (permalink)  
Antiguo 29/05/2013, 09:56
amin_ibz
 
Fecha de Ingreso: mayo-2013
Mensajes: 7
Antigüedad: 11 años
Puntos: 1
Respuesta: Consulta Listar Registros Php

yo usaria dos consultas:
$sql= mysql_query("select nombre_pais from pais,producto
where pais.id_pais=producto.id_pais and producto.id_pais is not null");
//con relacion a la tabla productos

$sql2= mysql_query("select nombre_pais from pais where id_pais not in (select id_pais from producto)");;//sin relacion

y las listas:
<table>
<tr>
<th>producto</th>
<tr>
<?php
while($row = mysql_fetch_array($sql))
{$pais=htmlentities($row['nombre_pais']);
echo "<tr><td><b>$pais</b></td></tr>";}

while($row = mysql_fetch_array($sql2))
{$pais=htmlentities($row['nombre_pais']);
echo "<tr><td>$pais</td></tr>";}
?>
</table>

lo e puesto en html "<b>" pero ponle un id al primer td y por css lo pones en negrita

nose si será esto lo que buscabas