[RSS Feed/News] Group and order by count?

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
For a table having data as the following:

user_id
2
4
1
5
6
3
1
6

I'm using the following query and grouping by user_id

PHP:

Code:
$d = \XF::finder('Asprin\FB:Foo')->fetch();
$grouped = $d->groupBy('user_id');
\XF::dump($grouped);

This is giving me the following output:
Code:

Code:
array:6 [▼
  6 => array:2 [▶]
  5 => array:1 [▶]...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom