Answers for "$this->db->select('*'); $this->db->where('id!=',1); $this->db->where('user_role =',2); codeignator"

-2

codeigniter select for update

$table = "my_table";
$id = 1;
$update = ["status"=>"working"];
//Edit just above / if you don't need extra "where" clause
$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);
Posted by: Guest on October-02-2020

Code answers related to "$this->db->select('*'); $this->db->where('id!=',1); $this->db->where('user_role =',2); codeignator"

Browse Popular Code Answers by Language