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
|
<?php
// Requete sql pour vérification si anniversaire J+30
$reponce = mysql_query("SELECT * FROM galette_adherents WHERE DATE_FORMAT(ddn_adh,'%m%d') BETWEEN DATE_FORMAT(CURDATE(), '%m%d') AND DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 30 DAY), '%m%d') ORDER BY ddn_adh DESC");
$query = "SELECT count(id_adh) from galette_adherents where ddn_adh IS NOT NULL";
$result = mysql_query($query) or die (mysql_error());
$resultat=mysql_fetch_row($result);
?>
<table>
<tr>
<th>NOM</th>
<th>PRENOM</th>
<th>ANNIVERSAIRE</th>
</tr>
<?php
//On affiche les lignes du tableau une à une à l'aide d'une boucle
while($donnees = mysql_fetch_array($reponce))
{
?>
<tr>
<td><?php echo $donnees['nom_adh'];?></td>
<td><?php echo $donnees['prenom_adh'];?></td>
<td><?php echo $donnees['ddn_adh'];?></td>
<?php |
Partager