Welcome Guest, Not a member yet? Register   Sign In
AR update bug when calculating with fields
#2

[eluser]Derek Allard[/eluser]
Funny. I just added this to AR last night, but it hasn't worked its way into the svn yet.
Quote:set() will also accept an optional third parameter ($escape), that will prevent data from being escaped if set to FALSE. To illustrate the difference, here is set() used both with and without the escape parameter.

$this->db->set('field', 'field+1', FALSE);
$this->db->update('mytable');
// gives INSERT INTO mytable (field) VALUES (field+1)

$this->db->set('field', 'field+1');
$this->db->update('mytable');
// gives INSERT INTO mytable (field) VALUES ('field+1')

This is will be in the svn shortly.


Messages In This Thread
AR update bug when calculating with fields - by El Forum - 01-03-2008, 05:18 AM
AR update bug when calculating with fields - by El Forum - 01-03-2008, 09:36 AM
AR update bug when calculating with fields - by El Forum - 01-03-2008, 10:20 AM
AR update bug when calculating with fields - by El Forum - 01-03-2008, 11:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB