![]() |
get result from join same table join - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: get result from join same table join (/showthread.php?tid=69118) |
get result from join same table join - falcon812311 - 10-10-2017 Hi, i want retrieve each h1_status, h2_status, ..h6_status from database and show it to view. my status_payment table: Code: status_id | status_name my user_sub_id table Code: id | h1_status | h2_status | h3_status | h4_status | h5_status | h6_status i want get each status name in table. what i try: PHP Code: function subsetIndex($user_id, $sub_id = false) Code: <tr> Please help me. RE: get result from join same table join - neuron - 10-10-2017 PHP Code: $this->db->select('sub.*, h1.status_name as h1_status_name, h2.status_name as h2_status_name'); //in view: PHP Code: <tr> RE: get result from join same table join - falcon812311 - 10-10-2017 (10-10-2017, 08:09 AM)neuron Wrote: Its work bro. Thank you so much! |