From be210ca9d37d464722e0fb1bfdaa16a11c385b7e Mon Sep 17 00:00:00 2001 From: Animation des soirees <nightiies@perso.iiens.net> Date: Tue, 8 Oct 2013 01:34:48 +0200 Subject: [PATCH] participants --- index.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 3d5eb26..7fd4380 100644 --- a/index.php +++ b/index.php @@ -15,9 +15,11 @@ $app->get( $sam = $samPics[array_rand($samPics)]; - $events = $bdd->prepare('SELECT id, title, date, place, description - FROM sam + $events = $bdd->prepare('SELECT s.id, title, date, place, description, GROUP_CONCAT(nick SEPARATOR ", ") as nicks + FROM sam s + LEFT OUTER JOIN sam_users su ON s.id = su.event WHERE date > '.time().' + GROUP BY s.id ORDER BY date'); $events->execute(); @@ -39,6 +41,7 @@ $app->get( <th>Titre</th> <th>Description</th> <th>Salle</th> + <th>Participants</th> </tr> </thead> <tbody> @@ -54,6 +57,7 @@ EOF; <td>$event[1]</td> <td>$description</td> <td>$event[3]</td> + <td>$event[5]</td> </tr> EOF; } -- GitLab