Reputation: 450
I need the following code in codeingiter.
mysql_query("DELETE `father_name` FROM `table` WHERE `id`='$id'");
So that on father name delete from the row not the whole row. Thanks in advance.
Upvotes: 0
Views: 3392
Reputation: 1146
Done in codeigniter like this.
$data = array('father_name' => 'NULL');
$this->db->where('id', $id);
$this->db->update('table', $data);
Upvotes: 3