diff options
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"); |