load(); } //获得用户创建的app public function getUserApp($uid = 0) { if(empty($uid)) { $uid = $this->user->id; } $sql = "SELECT * FROM ".$this->tbl_oauth_clients." WHERE user_id=".$this->user->id; $rs = $this->db->query($sql); $rows = $rs->fetchAll(); return $rows; } //获得某个App的信息 public function getAppInfo($id) { if(empty($id)) { return false; } $sql = "SELECT * FROM ".$this->tbl_oauth_clients." WHERE id=".$id; $rs = $this->db->query($sql); $rows = $rs->fetch(); return $rows; } }