Ver Mensaje Individual
  #7 (permalink)  
Antiguo 11/09/2008, 13:21
Avatar de Darth_Carl
Darth_Carl
 
Fecha de Ingreso: mayo-2008
Ubicación: En Foros DWP
Mensajes: 160
Antigüedad: 15 años, 11 meses
Puntos: 8
Respuesta: Mostrar 5 noticias ordenadas

A ver, hombre, que funcione como en un blog, que me coja el título y el texto de un artículo y que me lo ordene por id, para mostrar las últimas noticias

¿Es algo así?


Código PHP:
<?php
$title
=mysql_query("SELECT titulo from articulos limit 0,5 order by id desc");
$articulo=mysql_query("SELECT texto from articulos limit 0,5 order by id desc");
$var=1;
while(
$var<5) {
echo 
'<b>Título:</b>';
print 
$title;
echo 
'<br><b>Texto:</b>';
print 
$texto;
echo 
'<br><br><br>-----------------------------------------------------------<br><br><br>';
$var=$var 1;
}
?>
__________________
Si te ha servido, un karma POSITIVO es agradecido
NOTA: También se aceptan donaciones a PayPal xD