load->database(); $this->table = 'user'; $this->load_table('user'); } /** 通过userid查找 */ public function get_uid($userid,$own) { return $this->find("userid = '$userid' and own = '$own'"); } /** 通过API查找 */ public function get_api($api) { return $this->find("api = '$api'"); } /** 更新登陆信息 */ public function get_land($data) { $this->save(array('newtime'=>time(),'oldtime'=>$data['newtime']),$data['id']); } } //end class