Help w/ updating backend db with .csv file |
[eluser]pistolPete[/eluser]
[quote author="puddles" date="1255289050"]1) Understanding where the logic goes - in the view or in the controller?[/quote] Have a look at the user guide: http://ellislab.com/codeigniter/user-gui...w/mvc.html There should be little to no logic in the view! [quote author="puddles" date="1255289050"]2) What is the easiest way to take an array of a row's data (which has 31 fields), and insert it into a database using ActiveRecord?[/quote] If the array is associative, it's as simple as Code: $this->db->insert($array); [quote author="puddles" date="1255289050"]3) Is there a way to add array items to each row so that I can supplement the data that was provided in the actual .csv file?[/quote] I don't know if I understood you correctly, but you can serialize an array and save the result to the database. http://php.net/manual/en/function.serialize.php |
Messages In This Thread |
Help w/ updating backend db with .csv file - by El Forum - 10-11-2009, 08:24 AM
Help w/ updating backend db with .csv file - by El Forum - 10-11-2009, 09:19 AM
|