![]() |
Need help with data arrays - 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: Need help with data arrays (/showthread.php?tid=84785) |
Need help with data arrays - Solot - 11-09-2022 Hi Got two tables, Staff and Events. For a view, I need to get all the Staff records and, for each record, get a SUM of all the related (by Staffid) amount fields in Events. What I'd like is to have all the data from each record in Staff and the SUM total in the same array ...I just can't figure out a way to do that. Here's what I've got so far ... get all the Staff data and do a foreach loop to call a method to get the SUM total... but how to marry the two together??? Thank betflix joker RE: Need help with data arrays - esstogai - 11-25-2022 you need to have some kind of identifier |