Codeigniter Where And Condition Code Example


Example: 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);

Comments

Popular posts from this blog

Chrome Ipad Extensions Code Example

AngularJS $on Event Handler Trigger Order