want to fetch required data ( with subarray ) and populate it with unique customer to datatable by using external ajax

Viewed 35
$this->db->select('A.c_id, A.c_name, A.c_email, B.s_id, B.g_id, B.o_date, C.g_code, C.g_price')
                ->where('A.user_id', 1001)
                ->from('customers AS A')
                ->join('store AS B','B.c_id = A.c_id','LEFT')
                ->join('goods AS C','C.g_id = B.g_id','LEFT')
                ->order_by('A.c_id DESC')
                ->get()
                ->result_array();
  1. i want to populate array and sub-array data to datatable without repeating customer id/ customer name.
  2. [graphical representation of exact output and required output explained within attached png]: https://i.stack.imgur.com/oj4WV.png
0 Answers
Related