Ver Mensaje Individual
  #11 (permalink)  
Antiguo 02/05/2009, 08:32
Adell
 
Fecha de Ingreso: abril-2008
Mensajes: 435
Antigüedad: 16 años
Puntos: 10
Respuesta: Consulta a la base de datos continua en diferentes divs?

Código PHP:
<?php

include("usuarios/reg/config.php"); 

// mostramos las noticias,  
$consulta =  mysql_query("SELECT not_ID, titulo, texto, email, f_alta, imagen FROM noticias ORDER BY not_ID DESC LIMIT 3"$db_link
or die(
mysql_error()); 
while(list(
$not_ID$titulo$texto$email$f_alta$imagen)=mysql_fetch_row($consulta)) { 
noticia[] = $not_ID
noticia[] = $titulo;
noticia[] = $texto;
noticia[] = $email;
noticia[] = $f_alta;
noticia[] = $imagen
}
?>
ahora simplemente todo queda dentro del array para llamar al primer titulo usas
noticia[1], para el segundo titulo noticia[7], y para el tercer titulo noticia[13] y asi con todos

saludos