CodeIgniter Forums

Full Version: Update Insert Methods
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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.

El Forum

[eluser]fiat[/eluser]
please ignore.