[eluser]rupin[/eluser]
I have been trying to increment the count of a column in a table using the active record class.
Here is the code existing in my model
function increment_form_count($lorgID)
{
$this->db->set('createdForms', 'createdForms+1');
$this->db->where("orgID",$lorgID);
$this->db->update('organization');
}
When I lookup the MySQL logs the query that gets generated is
UPDATE `organization` SET `createdForms` = 'createdForms+1' WHERE `orgID` = '4'
The query looks OK, but the value in the DB has not incremented.
The type of column 'createdForms' is an INT type.
When I run the same query from phpmyadmin, the value gets updated.
Do i need to manually commit the transaction, since the value does not increment from code?