![]() |
Add fields to an active record query result - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Add fields to an active record query result (/showthread.php?tid=52345) |
Add fields to an active record query result - El Forum - 06-07-2012 [eluser]anis2505[/eluser] Hi, I have to export some database data to excell sheet. The data are stored on two DB tables tb1 and tb2. I want for to get only one single result for each element of tb1. joining the two table may result on more than one result for each tb1 elements tb1(id_tb1, other fileds) tb2(id_tb2, (FK) id_tb1, other fields) I was thinking is it possible to add some other fields to an active record query result. Please help I need it soo much Code: $query1 = $this->db->get('tb1'); |