Ver Mensaje Individual
  #7 (permalink)  
Antiguo 06/10/2011, 08:00
Avatar de CesarHC
CesarHC
 
Fecha de Ingreso: junio-2011
Ubicación: localhost
Mensajes: 566
Antigüedad: 12 años, 11 meses
Puntos: 56
Respuesta: Problema con OrderBy

Acabo de probar tu codigo y a mi me funciona.

Código PHP:
Ver original
  1. <?php
  2. $server="localhost";
  3. $usuario="root";
  4. $pass="";
  5. $bd="tu bd";
  6. $link=mysql_connect($server,$usuario,$pass)or die (exit(mysql_error()));
  7.  
  8. $result = mysql_query("SELECT * FROM fvideos ORDER BY id DESC LIMIT 4");
  9.  
  10. while ($y=mysql_fetch_assoc($result)){
  11.     $nombre=$y['nombre'];
  12.    
  13.     $hits=$y['hits'];
  14.     $video=$y['video'];
  15.     $imagen=$y['imagen'];
  16.     $id=$y['id'];
  17.    
  18.    
  19.     echo $hits;
  20.    
  21. }    
  22.  
  23.  ?>

A ver prueba este codigo.
__________________
Solo la práctica no te traicionara ¡¡¡¡¡¡

Seguir el camino tu debes PHP The Right Way.