Welcome Guest, Not a member yet? Register   Sign In
example of CRUD w/form_validation
#4

[eluser]Cristian Gilè[/eluser]
If you edit a record you have associated an ID, if you create a new record the ID doesn't exist before.

You can pass to your view an ID var set to 0 for a new entry and set to a value from db for an editing operation.
Then if the var ID is 0 the second parameter of set_value will be empty otherwise will be set to a value from db.

Cristian Gilè


Messages In This Thread
example of CRUD w/form_validation - by El Forum - 01-12-2011, 08:17 PM
example of CRUD w/form_validation - by El Forum - 01-13-2011, 01:51 AM
example of CRUD w/form_validation - by El Forum - 01-13-2011, 05:11 AM
example of CRUD w/form_validation - by El Forum - 01-13-2011, 05:26 AM
example of CRUD w/form_validation - by El Forum - 01-13-2011, 05:26 AM
example of CRUD w/form_validation - by El Forum - 03-16-2011, 02:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB