Salve ho un problema non riesco a far vedere solo gli ultimi 5 record inseriti nella tabella questo è il codice ma fa vedere tutta la tabella il campo oggi c'è la data.
codice:$Righe = 0; $result1 = mysql_query("select artid, sezid, titolo, contenuto, image, image1, oggi from articoli order by oggi DESC"); if (mysql_num_rows($result1) > 0) { echo "<table border=0 width=100% cellpadding=3 cellspacing=0>"; while(list($artid, $sezid, $titolo, $contenuto, $image, $image1, $oggi) = mysql_fetch_array($result1)) { if ($Righe < 5) { $result2 = mysql_query("select sezname from sezioni where sezid=$sezid "); list($sezname) = mysql_fetch_row($result2); echo "<tr><td valign=top width=15%>"; if ($image != ($path."vuoto.gif")){ if ($image1 != ($path."vuoto.gif")){ echo "<a href=\"$image1\"><img src=\"$image\" width=142 border=0></a></td></tr>"; } else{ echo"<img src=\"$image\" border=0><td></tr>"; } } echo "<tr><td class=tit width=85% valign=top> Comunicato del $oggi Italian time</td></tr>"; echo "<tr><td class=tit width=85% valign=top> $titolo</td></tr>"; echo "<tr><td align=right><a href=\"$image1\"><font size=2 face=Humanst521 BT><img border=0 src=../web2/images/biglia.jpg width=24 height=17></font></a>[/b]"; echo "<font face=Humanst521 BT size=2><a href=\"$image1\"> Scarica il file PDF</a></font></td></tr>"; echo "<tr><td align=right><font size=2 face=Humanst521 BT><img border=0 src=../web2/images/biglia.jpg width=24 height=17></font>"; echo "<font face=Humanst521 BT size=2> Invia il file per email</font></td></tr>"; $Righe + 1; } } echo "</table>"; } else{ } echo " <b class=px14>[/b]";
grazie per laiuto

Rispondi quotando
