CodeIgniter Forums
Update Insert Methods - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Update Insert Methods (/thread-40589.html)



Update Insert Methods - El Forum - 04-13-2011

[eluser]fiat[/eluser]
Hi All,

New to this framework and am wondering if there is a simple solution to my problem.

I am tired of continually having to write out arrays of table columns / values manually into an array before inserting/updating the database.

I have written a method to produce the field names of a table into an array, and I want to be able to build an array of 'fieldname' => 'fieldvalue' to automate this boring problem.

I've had a few tries at getting variable variables to do what I want, but I cannot get a method working to merge my fieldName array with my fieldValue array.

My question is, is this possible? What are others doing in database intense applications with CI to reduce manual coding of arrays.


Update Insert Methods - El Forum - 04-13-2011

[eluser]fiat[/eluser]
please ignore.