![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
11/09/2008, 13:47
|
![Avatar de Ronruby](http://static.forosdelweb.com/customavatars/avatar249338_1.gif) | | | Fecha de Ingreso: julio-2008 Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 16 años, 6 meses Puntos: 416 | |
Respuesta: Mostrar 5 noticias ordenadas :S No, no es asi.
Deberias leerte algun manual sobre consultar datos de la DB.
Es 1 SOLO QUERY.
$sql = "SELECT titulo, texto FROM articulos LIMIT 0,5 ORDER BY id DESC";
Luego:
$resultado = mysql_query($sql) or die(mysql_error());
Y FINALMENTE ... un truquito xD
while($fila = mysql_fetch_assoc($resultado)) {
echo $row['titulo']; //MAGIA!
} |