![]() |
how to create generic array for entities - 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: how to create generic array for entities (/showthread.php?tid=81359) |
how to create generic array for entities - yoshi - 02-19-2022 Hi, there. I trying create generic array for entities. Look at the following sourse. I got school entity at 'point A'. https://drive.google.com/file/d/1dOQO7_O8ovMsdil03VynBJ7FrRAeydGZ/view?usp=drivesdk Next, I try create a school domain. and then I want to get a school semester. good. I got 3 semester. https://drive.google.com/file/d/1SsPrbweUNQ40s7RCmEscTlVQ2drH4irx/view?usp=drivesdk Extract the entity from the 'period' table using the school's id and 'where'. Here the entity becomes an array at 'Point B'. Is there a way to return these as an entity array?(Remaining with entity type constraints) I know that using 'find()' returns an entity, but it doesn't seem to be possible with 'where()'. https://drive.google.com/file/d/1fi7EMHthPHodJNg90MFnBupXx0vuiMHH/view?usp=drivesdk Next, I would like to find out semester for today using 'for each' at 'Point C'. PHP Code: class SchoolController extends BaseController |