@include('funcoes.inc'); @mysql_connect($hostname, $user, $pass); @mysql_select_db($database); $Result = mysql_db_query($database," SELECT Noticia_radio.id AS id, Noticia_radio.tema AS idtema,Tema_radio.nome AS tema, Noticia_radio.titulo AS titulo, Noticia_radio.data AS data FROM Noticia_radio, Tema_radio WHERE Noticia_radio.tema= Tema_radio.id ORDER BY DATA DESC LIMIT 7;"); $i=0; while ( $row = mysql_fetch_object($Result) ){ $ids[$i] = $row->id; $titulos[$i] = $row->titulo; $temas[$i] = $row->tema; $datas[$i] = $row->data; $i=$i+1; } $i=0; while($i!=7){ ?> print $temas[$i];?> - print $titulos[$i];?> $i=$i+1; } ?>