codeigniter insert into database code example
Example 1: db insert codeigniter
Codeignator
Example 2: codeigniter insert
$data = array(
'title' => 'My title',
'name' => 'My Name',
'date' => 'My date'
);
$this->db->insert('mytable', $data);
Example 3: cideigniter orLike()
$this->db->like('title', 'match'); $this->db->or_like('body', $match);
Example 4: where group codeigniter
$this->db->select('*')->from('my_table')
->group_start()
->where('a', 'a')
->or_group_start()
->where('b', 'b')
->where('c', 'c')
->group_end()
->group_end()
->where('d', 'd')
->get();