Se vuoi solo le notizie degli ultimi 4 giorniCodice PHP:<?php
$data = '9999-01-01';
$query = mysql_query("select * from tabella order by datanew desc") or die(mysql_error() );
$str = '';
while ($row = mysql_fetch_assoc($query) ) {
if ($row['datanew'] != $data) {
$str.= $row['datanew'].'
';
$str.= $row['notizia'].'
';
$data = $row['datanew'];
}
else
$str.= $row['notizia'].'
';
}
echo $str;
?>
codice:select * from tabella where datanew >= curdate() - interval 3 day order by datanew desc![]()

Rispondi quotando