cideigniter orLike()
$this->db->like('title', 'match'); $this->db->or_like('body', $match);
// WHERE `title` LIKE '%match%' ESCAPE '!' OR `body` LIKE '%match%' ESCAPE '!'
cideigniter orLike()
$this->db->like('title', 'match'); $this->db->or_like('body', $match);
// WHERE `title` LIKE '%match%' ESCAPE '!' OR `body` LIKE '%match%' ESCAPE '!'
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);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us