Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
24 | public function bestCommenter() |
||
25 | { |
||
26 | |||
27 | |||
28 | $bestCommenter = DB::select(' |
||
29 | SELECT user.username, COUNT( user_id ) AS nb_comments |
||
30 | FROM `comments` |
||
31 | LEFT JOIN user ON user.id = comments.user_id |
||
32 | GROUP BY user_id |
||
33 | ORDER BY COUNT( user_id ) DESC |
||
34 | LIMIT 1'); |
||
35 | |||
36 | return $bestCommenter; |
||
37 | } |
||
38 | |||
56 |