PHP MYSQL - Affichage par date anglais

Bonjour,
J'ai crée un champ de date sur ma table video "mysql windows"

date en forme date

Mes article s'affichent bien dans l'ordre des dates mais la date est en anglais - 2007-05-01
j'aimerais l'avir en francais

_____________________________________
voici mon code php qui permet l'affichage

$commaff= mysql_query("SELECT * FROM ".T_VIDEOCAST." ORDER BY date DESC LIMIT $page,$parpage");
Configuration: Windows XP
Internet Explorer 7.0

10 réponses

  1. Contributeur
    Désole j'arrête de t'aider ici, tu ne réponds pas aux questions.
    1. Bonjour, je suis de retour,

      voila, je l'ai mis en format 'DATE'

      avec DATETIME, je ne veux pas car il met les minutes

      Merci de ton aide
      1. Contributeur
        Tu n'a toujours pas dis quel est le type de ton champs date, et ça serait bien de savoir comment tu remplis ce champs.
        1. just epour remonter mon sijet car je suis toujour dans l'embara!!!
          1. toujour pas d'aide de personne ? aidez-moi svp je suis vraiment coincé ??,
            1. Voila ma source php

              merci pour ton aide

              <?php

              $total=0;
              $parpage=10;
              if(isset($_GET['page']))
              $page=$_GET['page'];
              else
              $page=0;
              if(isset($_GET['cat'])){
              $cat=$_GET['cat'];
              $totalid=mysql_query("SELECT * from ".T_VIDEOCAST." WHERE idcat='$cat' ORDER BY id LIMIT $page,$parpage ");

              $commaff= mysql_query("SELECT * FROM ".T_VIDEOCAST." WHERE idcat='$cat' ORDER BY id LIMIT $page,$parpage ");

              }else
              {
              $totalid=mysql_query("SELECT * from ".T_VIDEOCAST."");
              $commaff= mysql_query("SELECT * FROM ".T_VIDEOCAST." ORDER BY date DESC LIMIT $page,$parpage");

              }
              while ($donnees = mysql_fetch_array($totalid))
              {
              $total++;
              }
              while ($donnees = mysql_fetch_array($commaff))
              {
              $max=150;
              $chaine=$donnees['description'];
              if(strlen($chaine)>=$max)
              {
              $chaine=substr($chaine,0,$max);
              $espace=strrpos($chaine," ");
              if($espace)
              $chaine=substr($chaine,0,$espace);
              $chaine .= ' ...';
              }
              $numero=$donnees[0];
              echo'<table id="Tableau_01" width="720" height="106" border="0" cellpadding="0" cellspacing="0">
              <tr>
              <td>
              <img src="images/videosradio_01.png" width="720" height="8" alt=""></td>
              </tr>
              <tr>
              <td><table width="720" height="88" border="0" cellpadding="0" cellspacing="0">
              <tr>
              <td valign="top" background="images/videosradio_02.png"><div align="center">
              <table width="98%" border="0" cellspacing="0" cellpadding="0" class="artiste">
              <tr>
              <td width="11%" valign="top"><table width="70" height="70" border="0" cellpadding="0" cellspacing="0">
              <tr>
              <td valign="middle" ><div ><a href="lecturevideos.php?numero='.$donnees['id'].'"><img src="podcast/images/'.$donnees[4].'" width="83" height="83" border="0" class="glossy iradius" margin-bottom:5px;"></a></div></td>
              </tr>
              </table></td>
              <td width="89%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="5">
              <tr>
              <td><a href="lecturevideos.php?numero='.$donnees['id'].'"> <strong>'.stripslashes ($donnees['titre']).'</strong></a><strong> </strong>- '.$donnees['date'].'<br>
              '.stripslashes ($chaine).'</td>
              </tr>
              </table></td>
              </tr>
              </table>
              </div></td>
              </tr>
              </table></td>
              </tr>
              <tr>
              <td>
              <img src="images/videosradio_03.png" width="720" height="10" alt=""></td>
              </tr>
              </table><br />

              ';
              }
              ?>
              1. Contributeur
                "j'ai essayer mais ca ne veu rien savoir"
                C'est vague ...

                "aurais tu un bout de code complet ? avec mes champs ? "
                J'ai oublié ma boule de cristal.

                Bien sur il faut que ton champs date soit de typte datetime.
                1. Merci beaucoup de ta réponse rapide, j'ai essayer mais ca ne veu rien savoir, peu etre une erreur dans ma manière d'inserer ce code ? aurais tu un bout de code complet ? avec mes champs ?

                  Merci de ton aide
                  1. Contributeur
                    Salut,

                    Mets ça :

                    $commaff= mysql_query("SELECT champs1, champs2, champs_etc, DATE_FORMAT(date, \'%d-%m-%Y\') AS DateTemps FROM ".T_VIDEOCAST." ORDER BY date DESC LIMIT $page,$parpage");
                    


                    DateTemps contient la date dans le format voulu.