• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Link Relationships in Codeigniter

i work on open source LMS , in URL 
 when i log into this course , i have sections and content , here is Udemy Course https://ibb.co/gyfd8yG , i want to do the same thing in my project, here is my query

PHP Code:
public function get_course_data($id)
       $this->db->join('sections','sections.section_course =courses.course_id ');
       $this->db->join('contents','contents.section_num = sections.section_id');
       return $this->db->get()->result_array();

when i do foreach in frontend this query print all queries , my question is how i can specify to print All Contents who linked to the same section id, what is the logical way ?
thanks in advance.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.