Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/03/2010, 00:24
Avatar de jimadri
jimadri
 
Fecha de Ingreso: julio-2006
Ubicación: Buenos Aires
Mensajes: 487
Antigüedad: 17 años, 10 meses
Puntos: 1
No veo los resultados!!

Hola, tengo un archivo que se llama verjuegos.php donde me deberia mostrar un listado de juegos segun la categoria que seleccione en un menú. Las categorias serian PC, WII, etc.
A los item del menú le agregué las siguientes URL's :

verjuegos.php?tipo=wii
verjuegos.php?tipo=pc
verjuegos.php?tipo=ps2

el archivo php verjuegos.php tiene la siguiente consulta:

Código PHP:
<?
   
include('conexion.bd.sql.php');
   
?>
   <?
   $buscar 
== "tipo";
   
?>
   
   <?
  
   
// armo la consulta
   
   
$sql "select * from juegos where genero like '$buscar'";
   
$result mysql_query($sql,$conn);
   
   if (
mysql_error())
   {
       echo 
"ERROR al conectarse con la DB ".
       
mysql_errno().":"mysql_error()."<br>";
       
   }
   
 while (
$myrow mysql_fetch_array($result))
 
 {
       
       
   
   
?>
   
   <table align="center" border="0" width="549">
   <tr>
     <td width="349" align="left" valign="top" class="txt"><table align="center" border="0" width="549">
       <tr>
         <td width="190" rowspan="7" align="center" valign="top"><img src="cpanel/img_pelis/<?php echo $myrow['imagen']; ?>" width="159" height="211" /><a href="agregacar2.php?&amp;id=<?php echo $myrow['id_peli']; ?>"><img src="add_carro.png" width="173" height="62" border="0" /></a></td>
         <td width="349" height="20" align="left"><font color="#FF9900" class="txt_titulo_pelis"><b><strong><?php echo $myrow['titulo']; ?></strong></b></font></td>
       </tr>
       <tr>
         <td width="349" align="left" valign="top" class="txt"><b class="txt">Director: </b>
           <?php if ($myrow['director'] !=""){ echo $myrow['director'];     } else { echo "No hay informacion"; }?></td>
       </tr>
       <tr>
         <td width="349" align="left" valign="top" class="txt"><b class="txt">Actores: </b>
           <?php if ($myrow['actores'] !=""){ echo $myrow['actores'];     } else { echo "No hay informacion"; }?></td>
       </tr>
       <tr>
         <td width="349" align="left" valign="top" class="txt"><b class="txt">Duraci&oacute;n: </b>
           <?php if ($myrow['duracion'] !=""){ echo $myrow['duracion']." Min";     } else { echo "No hay informacion"; }?></td>
       </tr>
       <tr>
         <td width="349" align="left" valign="top" class="txt"><b class="txt">G&eacute;nero: </b><?php echo $myrow['genero']; ?></td>
       </tr>
       <tr>
         <td width="349" align="left" valign="top" class="txt"><b class="txt">Idioma/Subt&iacute;tulo: </b>
           <?php if ($myrow['idioma'] !=""){ echo $myrow['idioma']; } else { echo "No hay Idioma"; }?>
           <?php if ($myrow['subtitulo'] !=""){ echo " / ".$myrow['subtitulo'];     } else { echo " / Sin subtitulo"; }?></td>
       </tr>
       <tr>
         <td width="349" align="left" valign="top" class="txt"><b class="txt">Sinopsis: </b>
           <?php if ($myrow['sinopsis'] !=""){ echo $myrow['sinopsis']; } else { echo "No hay informacion"; }?></td>
       </tr>
       <?php 
            
if (isset($myrow['id_peli']))
                { 
?>
  <td align="center" width="190">&nbsp;</td>
  </tr>
  <?php
                
}
            else
                { 
?>
  <tr>
    <td width="190" align="center" class="txt_ADVERTENCIA"><div align="center"><strong>NO DISPONIBLE</strong></div></td>
  </tr>
  <?php
                
                
}
            
?>
     </table></td>
   </tr>
   </table>
Pero no veo los resultados. Ahora bien, si en la consulta el texto es = "Select * from juego"; ahi si se ven los resultados.

Que estoy haciendo mal???