Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/03/2004, 13:58
Avatar de Reynier
Reynier
 
Fecha de Ingreso: noviembre-2002
Ubicación: Por ahí en algún sitio
Mensajes: 1.844
Antigüedad: 21 años, 5 meses
Puntos: 1
Porque me hace esto ...

Porque esta consulta no me devuelve el primer registro de la tabla ?

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:&nbsp;<span class=newstitle>"
.$resmostrar['titulo']."</span>,<span class=txt>&nbsp;con ID:<span class=menutop>".$resmostrar['idsitio']."</td>
   </tr>
   <tr>
   <td colspan=2><div align=justify><span class=txt><strong>Título:&nbsp;<span class=txt>"
.$resmostrar['titulo']."</td>
   </tr>
   <tr>
   <td colspan=2><div align=justify><span class=txt><strong>Descripción:&nbsp;<span class=txt>"
.htmlentities($resmostrar['descripcion'])."</td>
   </tr>
   <tr>
   <td colspan=2><div align=justify><span class=txt><strong>Dirección Web:&nbsp;<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:&nbsp;<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>"

mi tabla:
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
__________________
Ing. Reynier Pérez Mira