Problem with arithmetic operations and active record |
(10-30-2015, 03:55 PM)gustavo81988 Wrote: Hi guys i need to make this query UPDATE `php_items` SET `item_quantity` = `item_quantity` - 10 WHERE `item_id` = 1 using the active record class and i have tried this: You should disable auto-escape like following: PHP Code: $this->db->set('item_quantity', 'item_quantity - 10', FALSE); Read more http://www.codeigniter.com/user_guide/da...ating-data |
Messages In This Thread |
Problem with arithmetic operations and active record - by gustavo81988 - 10-30-2015, 03:55 PM
RE: Problem with arithmetic operations and active record - by pdthinh - 10-30-2015, 08:27 PM
|