Welcome Guest, Not a member yet? Register   Sign In
You must use the SET method to update an entry
#8

[eluser]NachoLabs[/eluser]
I'm getting the same error. I checked the DB and all the fields were indeed set to not null, so i fixed it and am still getting the same error. Check out my code:
Code:
function item($id,$datos) {
        $q = $this->db->get_where('data', array('id' => $id));
        if(isset($datos)) {
            if($datos===false) {
                return $this->db->delete('data', array('id' => $id));
            } else {
                $this->db->set($datos);
                if($q->num_rows()>0) {
                    $this->db->where('id',$id);
                    $this->db->update('data'); // <---- i tracked the error to this line.
                } else {
                    $this->db->insert('data');
                }
            }
        } else {
            return $q->row();
        }
    }

halp!


Messages In This Thread
You must use the SET method to update an entry - by El Forum - 07-11-2007, 11:23 AM
You must use the SET method to update an entry - by El Forum - 07-17-2007, 05:41 PM
You must use the SET method to update an entry - by El Forum - 09-08-2008, 07:03 PM
You must use the SET method to update an entry - by El Forum - 10-16-2008, 06:51 PM
You must use the SET method to update an entry - by El Forum - 10-16-2008, 09:00 PM
You must use the SET method to update an entry - by El Forum - 10-16-2008, 10:01 PM
You must use the SET method to update an entry - by El Forum - 04-28-2009, 05:24 AM
You must use the SET method to update an entry - by El Forum - 12-20-2009, 11:40 AM
You must use the SET method to update an entry - by El Forum - 12-20-2009, 11:44 AM
You must use the SET method to update an entry - by El Forum - 03-02-2010, 07:55 AM
You must use the SET method to update an entry - by El Forum - 11-30-2010, 02:36 AM
You must use the SET method to update an entry - by El Forum - 03-16-2011, 02:56 AM
You must use the SET method to update an entry - by El Forum - 07-27-2011, 06:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB