db->select('expire_at'); $this->db->from('authentification_url'); $this->db->where('token',$token); $query=$this->db->get(); if($query->num_rows()>0){ return $this->db->get()->row()->expire_at; }else{ return null; } } public function save_auth($auth){ $this->db->insert('authentification_url', $auth); return $this->db->insert_id(); } }