diff options
author | Nicolas BERNSTEIN <alexis211@gmail.com> | 2011-09-17 16:48:29 +0200 |
---|---|---|
committer | Nicolas BERNSTEIN <alexis211@gmail.com> | 2011-09-17 16:48:29 +0200 |
commit | d0060968b77c39bdf8abffb071c971c166b59edb (patch) | |
tree | 0be52e00a25bd298235a0cf916fb07496d3ab95f /lib/notes/index.php | |
download | Bits-d0060968b77c39bdf8abffb071c971c166b59edb.tar.gz Bits-d0060968b77c39bdf8abffb071c971c166b59edb.zip |
First commit.
Diffstat (limited to 'lib/notes/index.php')
-rw-r--r-- | lib/notes/index.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/notes/index.php b/lib/notes/index.php new file mode 100644 index 0000000..3c81f46 --- /dev/null +++ b/lib/notes/index.php @@ -0,0 +1,9 @@ +<?php + +$users = array(); +$n = sql("SELECT account.id AS id, login AS name, COUNT(notes.id) AS nbNotes FROM account ". + "LEFT JOIN notes ON notes.owner = account.id ". + "WHERE notes.public != 0 AND notes.id != 0 ". + "GROUP BY account.id ORDER BY nbNotes DESC"); +while ($nn = mysql_fetch_assoc($n)) $users[] = $nn; +require("tpl/notes/index.php"); |