connexion(); $db1->requete("Select * from actualite ORDER BY date DESC"); //$db1->next(); //if($db1->nbrResult() > 3 ) //{ $i=1; $dateAuj= date("Y-m-d"); $LaDate= $dateAuj; $annee= substr($LaDate,0,4); $nommois = substr($LaDate,5,2); $jour = substr($LaDate,8,2); $dateAuj= $jour."-".$nommois."-".$annee; echo' '; while ($db1->next() && ($i<2)) { $DateAct1=$db1->data->date; $LaDate= $DateAct1; $annee= substr($LaDate,0,4); $nommois = substr($LaDate,5,2); $jour = substr($LaDate,8,2); $DateAct1= $jour."-".$nommois."-".$annee; echo ' '; echo''; $i=$i+1; //$db1->next(); } echo'
'.substr($db1->data->texte,0,170).'... Lire la suite
'; //} ?>