![]() |
Hello,
I have an Model where i need to set the "allowedFields" with big array data (more than 50 fields)! Is possible to define "allowedFields" where i not need to insert all fields!? thanks
you mean, instead of marking allowedFields which are various you want NOTallowedFields which are fewer?
yet i failed to find this type of thing. may be seniors will advise for proper solution, if it is a valid question. happy learning CI4. Newbie here in CodeIgniter World !! Please appologize if any nonsense from me.
environment: Windows 10, XAMPP 3.3.0, VS Code, SQLyog Community Ed.
Please read:
CodeIgniter User Guide - Using CodeIgniter’s Model - $allowedFields What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(08-02-2022, 10:46 PM)Ahmed Haroon Wrote: you mean, instead of marking allowedFields which are various you want NOTallowedFields which are fewer? the solution is: $ClientiModel->protect(false)->insert(array("column"=>"val")); |
Welcome Guest, Not a member yet? Register Sign In |