Bonjour !

je cherche a afficher que les evenments dont le champ date_fin est plus grande ou égale à la date actuelle (c'est a dire les evenements futur)
sachant que mon champs date_fin est de type date (0000-00-00)
pb ca m'affiche tous les evenements, meme ceux avec une date-fin du par ex: 2010-07-17
la comprends vraiment pas ???
voici mon code et ma requete :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
$date_actuelle = date('Y-m-d');
 
$reponse = $bdd->query("SELECT *
FROM evenement
JOIN jointure_evenement_prof
ON evenement.id_evenement = jointure_evenement_prof.idEvenement
JOIN prof
ON jointure_evenement_prof.idProf = prof.id_prof
WHERE date_fin >= $date_actuelle
ORDER BY date_debut
") or die(print_r($bdd->errorInfo())); //requete
 
while ($donnees = $reponse->fetch())
{
?>
<p><?php echo $donnees['date_fin'];?></p>
<?php
}
?>
et voici mes tables :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
CREATE TABLE IF NOT EXISTS `evenement` (
  `id_evenement` int(11) NOT NULL AUTO_INCREMENT,
  `titre` varchar(250) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_type_evenement` tinyint(4) NOT NULL,
  `date_text` text NOT NULL,
  `date_courte` varchar(200) NOT NULL,
  `date_debut` date NOT NULL,
  `date_fin` date NOT NULL,
  `adresse` tinytext NOT NULL,
  `cpostal` mediumint(5) unsigned NOT NULL,
  `ville` varchar(50) NOT NULL,
  `renseignements_inscription` text NOT NULL,
  `bulletin_inscription_pdf` varchar(100) NOT NULL,
  `url_bulletin_inscription` text NOT NULL,
  `text_court` text NOT NULL,
  `text` text NOT NULL,
  PRIMARY KEY (`id_evenement`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=83 ;
 
CREATE TABLE IF NOT EXISTS `jointure_evenement_prof` (
  `idJointureProfEvenement` smallint(6) NOT NULL AUTO_INCREMENT,
  `idProf` tinyint(4) NOT NULL,
  `idEvenement` tinyint(4) NOT NULL,
  PRIMARY KEY (`idJointureProfEvenement`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=68 ;
 
CREATE TABLE IF NOT EXISTS `prof` (
  `id_prof` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `nom` varchar(30) NOT NULL,
  `prenom` varchar(40) NOT NULL,
  `ecole` varchar(50) NOT NULL,
  `adresse_cours1` text NOT NULL,
  `url_plan_adresse_cours1` text NOT NULL,
  `adresse_cours2` text NOT NULL,
  `url_plan_adresse_cours2` text NOT NULL,
  `adresse_cours3` text NOT NULL,
  `url_plan_adresse_cours3` text NOT NULL,
  `tel` varchar(80) NOT NULL,
  `mail` varchar(50) NOT NULL,
  `site_web` varchar(50) NOT NULL,
  `cours` text NOT NULL,
  `formation` text NOT NULL,
  `enseignement` text NOT NULL,
  `federation` text NOT NULL,
  `cheminement` text NOT NULL,
  PRIMARY KEY (`id_prof`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=71 ;