COUNT / GROUP BY with active record?

后端 未结 5 2148
既然无缘
既然无缘 2020-12-01 12:02

I have a table with the following info:

id  |  user_id  |  points
--------------------------
1   |  12       |  48
2   |  15       |  36
3   |  18       |  2         


        
5条回答
  •  一生所求
    2020-12-01 12:55

    $this->db->select('overal_points');
    $this->db->where('point_publish', 1);
    $this->db->order_by('overal_points', 'desc'); 
    $query = $this->db->get('company', 4)->result();
    

提交回复
热议问题