form, update existing value with 1 |
[eluser]Unknown[/eluser]
In my model, I want to update the existing value (int) with +1 everytime the form is submitted. Can someone please help me how to write the query with active records? Thanks. /Dan
[eluser]Cristian Gilè[/eluser]
model: Code: private function _get_value($id) In the controller call the set_value method. Cristian Gilè
[eluser]Roy MJ[/eluser]
Making a primary key would be the easiest way.And then set it as auto_increment. http://www.w3schools.com/sql/sql_primarykey.asp |
Welcome Guest, Not a member yet? Register Sign In |