Código PHP:
$query = mysql_query("SELECT dir.*, catdir.* FROM directorio dir, catdirectorio catdir WHERE dir.idcategoria = catdir.idcategoria AND dir.idsitio='".$idsitio."'");
$resmostrar = mysql_fetch_array($query);
echo "
<table width=100% border=0 cellspacing=1 cellpadding=2>
<tr>
<td colspan=2><div align=center><span class=txt>Mostrando el Sitio: <span class=newstitle>".$resmostrar['titulo']."</span>,<span class=txt> con ID:<span class=menutop>".$resmostrar['idsitio']."</td>
</tr>
<tr>
<td colspan=2><div align=justify><span class=txt><strong>Título: <span class=txt>".$resmostrar['titulo']."</td>
</tr>
<tr>
<td colspan=2><div align=justify><span class=txt><strong>Descripción: <span class=txt>".htmlentities($resmostrar['descripcion'])."</td>
</tr>
<tr>
<td colspan=2><div align=justify><span class=txt><strong>Dirección Web: <span class=txt><a href='".$resmostrar['url']."' target='".$resmostrar['donde']."'>".$resmostrar['url']."</td>
</tr>
<tr>
<td colspan=2><hr color=#666666 size=1 noshade></td>
</tr>
<tr>
<td><div align=justify><span class=txt><strong>Categoría: <span class=txt>";
switch($resmostrar['nombre']){
case "1":
echo "Nacionales";
break;
case "2":
echo "Internacionales";
break;
case "3":
echo "Asignatura";
break;
}
echo "</td>
</tr>
<tr>
<td colspan=2><hr color=#666666 size=1 noshade></td>
</tr>
</table>";
idsitio -- idcategoria -- titulo -- descripcion -- url --
1 1 Pepe pepe http://pepe.com
2 1 Pepe2 pepe2 http://pepe2.com
solo me muestra
idsitio -- idcategoria -- titulo -- descripcion -- url --
2 1 Pepe2 pepe 2 http://pepe2.com
no se porque razón hace esto
![Pensando](http://static.forosdelweb.com/fdwtheme/images/smilies/scratchchin.gif)