Objet : devel-adl
Archives de la liste
- From: svn AT agendadulibre.org
- To: devel AT agendadulibre.org
- Subject: [Devel] r214 - trunk
- Date: Sun, 14 Jan 2007 19:43:00 +0100 (CET)
- List-archive: <http://lolut.utbm.info/pipermail/devel>
- List-id: Developpement de l'Agenda du Libre <devel.agendadulibre.org>
Author: thomas
Date: Sun Jan 14 19:42:59 2007
New Revision: 214
Modified:
trunk/stats.php
Log:
Ajout de statistiques par ville.
Modified: trunk/stats.php
==============================================================================
--- trunk/stats.php (original)
+++ trunk/stats.php Sun Jan 14 19:42:59 2007
@@ -74,6 +74,35 @@
echo "</table>";
+echo "<h3>Statistiques par ville</h3>";
+
+$result = $db->query ("select city,count(*) as 'event_count' from events
group by city order by event_count desc");
+
+echo "<table class=\"stats\">";
+
+$i = 0;
+while ($row = mysql_fetch_object($result))
+{
+ /* The preselection could have been directly in MySQL, but
+ unfortunately, MySQL 4.0 doesn't support subrequests in the from
+ clause */
+ if ($row->event_count <= 3)
+ break;
+
+ if ($i % 2 == 0)
+ echo "<tr class=\"odd\">";
+ else
+ echo "<tr class=\"even\">";
+
+ echo "<td class=\"item\">" . $row->city . "</td><td class=\"value\">" .
$row->event_count . "</td>";
+
+ echo "</tr>";
+
+ $i++;
+}
+
+echo "</table>";
+
echo "<h3>Statistiques par date</h3>";
$result = $db->query ("SELECT CONCAT(YEAR(start_time), '-',
MONTH(start_time)) AS 'month',COUNT(*) AS 'event_count' FROM events GROUP BY
EXTRACT(YEAR_MONTH FROM start_time)");
- [Devel] r214 - trunk, svn, 14/01/2007
- Re: [Devel] r214 - trunk, David MENTRE, 14/01/2007
- Re: [Devel] r214 - trunk, Thomas Petazzoni, 14/01/2007
- Re: [Devel] r214 - trunk, David MENTRE, 14/01/2007
- Re: [Devel] r214 - trunk, Thomas Petazzoni, 14/01/2007
- Re: [Devel] r214 - trunk, David MENTRE, 14/01/2007
Archives gérées par MHonArc 2.6.16.