As shown earlier, the FROM portion of your query can be specified in the $this->db->get() function, so use whichever method you prefer.
Let’s create a $this->db->from() method in codeigniter
$this->db->select('username, password, admin');
$this->db->from('tbl_user');
$query = $this->db->get();