This is the platform-independent base Query Builder implementation class.
Author: EllisLab Dev Team
Inheritance: extends CI_DB_driver
Exemplo n.º 1
0
 protected function is_unique($field, $value, $id)
 {
     $where = [$field => $value];
     if ($id) {
         $where[] = "id != {$id}";
     }
     return !$this->db->get_where($this->table, $where)->row_array();
 }
Exemplo n.º 2
0
 public function get_by_id($id)
 {
     return $this->db->get_where($this->table, ['id' => $id])->row_array();
 }