Forum Discussion

mahesh_revanwar's avatar
9 years ago

Get user details using v2 call order by last visit time

Hi All,

 

I want users sorted by there last activity.

 

I have tried V2 call :

 

SELECT * FROM users WHERE roles.name="Administrator"

 

It have a last_visit_time as one parameter. Can we use this for getting result of users order by this parameter?

 

I have tried bellow call but it gives error.

SELECT * FROM users WHERE roles.name="Administrator" ORDER BY last_visit_time'

 

Please help me if you know any better approach or any thing that sorts users by last_visit_time.

 

Regards,

Mahesh Revanwar

  • OlivierS's avatar
    OlivierS
    Lithium Alumni (Retired)

    mahesh_revanwar it looks like it's not possible to use that field with the ORDER BY clause

     

    Field 'last_visit_time' does not exist for object 'users' as a sort constraint.
    • SylvainK's avatar
      SylvainK
      Contributor

      Hello,

       

      Got the same problem.

      Any guess how to solve it ?

       

      Didn't find in the docs :/

       

      Regards.