Welcome Guest, Not a member yet? Register   Sign In
Oobleck - A patterned approach to dealing with forms and databases in CI controllers
#7

[eluser]webthink[/eluser]
Hi abmcr,
Upload is a bit tricky because there isn't just a form->db interface to worry about. You've also got to handle the server side storage/processing of the file.
What you could do is handle all of that within one of the _set_additional_values_[TABLE_NAME]_[ACTION] functions which are called automatically. That way you do everything you need to do with the physical files according to your own set up. and then set $additional_values ['file_path'] or whatever you want to be inserted into the db. The fill_db_from_form() library method will automatically check to see if this method exists in your controller and then use whatever values are returned from it to update/insert into the db.


Messages In This Thread
Oobleck - A patterned approach to dealing with forms and databases in CI controllers - by El Forum - 02-25-2008, 05:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB