$this->assign('behind',$behind[0]['id']);
}
return $this->fetch();
}
public function show2()
{
$M = input();
$res = Db::name($M['TBname'])->where('type',$M['type'])->where('id',$M['id'])->select();
$front = Db::name($M['TBname'])->where('type',$M['type'])->where('id','<',$M['id'])->order("id ASC")->select();
if( (count($front)-1)>=0)
$front[0] = $front[count($front)-1];
$behind = Db::name($M['TBname'])->where('type',$M['type'])->where('id','>',$M['id'])->order("id ASC")->limit(1)->select();
$temp1 = explode("-" , $res[0]["date"]);
$res[0]["year"] = $temp1[0];
$res[0]["month"] = $temp1[1];