where query in codeignator code example
Example 1: codeigniter where_not_in
$names = array('Frank', 'Todd', 'James');
$this->db->where_not_in('username', $names);
Example 2: codeigniter insert
$data = array(
'title' => 'My title',
'name' => 'My Name',
'date' => 'My date'
);
$this->db->insert('mytable', $data);
Example 3: codeigniter select for update
$table = "my_table";
$id = 1;
$update = ["status"=>"working"];
$query = $this->db->select()
->from($table)
->where('id', $id)
->get_compiled_select();
$data = $this->db->query("$query FOR UPDATE")->row_array();
$this->db->where('id', $data['id'])->update($table,$update);