Welcome Guest, Not a member yet? Register   Sign In
Codeigniter Activerecord update method refuses to insert NULL value
#6

[eluser]WanWizard[/eluser]
Odd.

I just tested
Code:
$data = array('status' => 'OPEN', 'reservation_id' => NULL);
$this->db->where('id', 4);
$this->db->update('schedules', $data);
echo $this->db->last_query();

on both CI 1.7.2 and CI 2.0, and both produce the query

Code:
UPDATE `schedules` SET `status` = 'OPEN', `reservation_id` = NULL WHERE `id` = 4

which looks fine to me. Which version of CI are you using?


Messages In This Thread
Codeigniter Activerecord update method refuses to insert NULL value - by El Forum - 08-19-2010, 01:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB