[eluser]xatrix[/eluser]
Code:
$this->db->set(array('upvotes' => 'upvotes - 1', 'downvotes' => 'downvotes + 1'), FALSE);
$this->db->where('id', $answer_id);
$this->db->update('answers');
Even though escape has been set to FALSE, 'upvotes - 1' and 'downvotes - 1' are still escaped.
Now if I break each set on it's own line as
Code:
$this->db->set('upvotes', 'upvotes - 1', FALSE);
$this->db->set('downvotes', 'downvotes + 1', FALSE);
It works. Can someone confirm this?
-edit-
Please delete this. I had to set the second parameter (value) to NULL when using an array.