public function search2() { $ky = $_GET['id']; $data['Belong_to'] = $ky; $arr = $this->where($data)->select(); $m1 = new \Home\Model\WeiboUserModel(); foreach ($arr as $key => $value) { $name = array('name' => $value['name']); $arr2 = $m1->where($name)->select(); $arr[$key]['uname'] = $arr2[0]['uname']; $arr[$key]['uid'] = $arr2[0]['id']; } return $arr; }
public function getFans() { //get id $ids = $_GET['id']; //echo $ids; $n = split(";", $ids); $m1 = new \Home\Model\WeiboUserModel(); $data['name'] = array('in', $n); $arr = $m1->where($data)->select(); $this->assign('data', $arr); $content = $this->fetch('Weibo:searchperson'); $this->assign('content', $content); $this->display("public:tpl"); }