Welcome Guest, Not a member yet? Register   Sign In
Active Record Update Sum 1
#1

[eluser]Fantass[/eluser]
Im trying to each time that access to the method updade +1 like a counter.. This is what i got
Code:
$this->db->where('id',$row->id);
        $update = array(
            'counter' => +1,
        );
        $this->db->update('table', $update);
But instead sum 1 write '1' In te row.
Thanks


Messages In This Thread
Active Record Update Sum 1 - by El Forum - 02-26-2012, 06:44 PM
Active Record Update Sum 1 - by El Forum - 02-26-2012, 08:30 PM
Active Record Update Sum 1 - by El Forum - 02-27-2012, 12:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB