![]() |
Replace old data to new data by Group ID - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31) +--- Thread: Replace old data to new data by Group ID (/showthread.php?tid=82458) |
Replace old data to new data by Group ID - flux1on - 07-12-2022 I have table like Code: tb_class And i implement sortable for draggable to replace old records tb_class by group_id. Code: tb_class Can i use replace() function in Model? I need sample model to provide this RE: Replace old data to new data by Group ID - ozornick - 07-12-2022 The "replace" method replaces the entry and applies the new ID if the entry exists. This is bad. Use the "update" method http://codeigniter.com/user_guide/database/query_builder.html#builder-update |