Incrementing a counter |
[eluser]Unknown[/eluser]
Hi, How can I increment a counter using Active Record? This is not working for me: Code: $this->db->update('page', array('views' => 'views+1')); Please help.
[eluser]LuckyFella73[/eluser]
Hi everactive, try the SET function and use the additional parameter to prevent escaping: Code: $this->db->set('views', 'views+1', FALSE); User guide: Active Record Class / Update |
Welcome Guest, Not a member yet? Register Sign In |