1. 程式人生 > >discuz 資料分頁

discuz 資料分頁

<!--{eval $uid = $_GET['uid']}-->
<!--{eval $favorite = DB::fetch_all('SELECT `title` FROM '.DB::table('home_favorite').' WHERE `uid` ='.$uid.'');}-->
<!--{eval $reply = DB::fetch_all('SELECT * FROM '.DB::table('forum_post').' WHERE `authorid` ='.$uid.'')}-->
<!--{eval $perpage = 14;//頁數}-->
<!--{eval $card = DB::fetch_all('SELECT `subject` FROM '.DB::table('forum_thread').' WHERE `authorid` ='.$uid.'');}-->
<!--{eval $curpage = empty ( $_GET['page'] ) ? 1 : intval ( $_GET['page'] );//獲取當前頁程式碼}-->
<!--{eval $start = ($curpage-1)*$perpage;//獲取起始資料}-->
<!--{eval $askscount = count($card);}-->
<!--{eval //如果有資料$start,$perpage
    $que = DB::fetch_all("select * from dis_forum_thread where authorid=$uid order by dateline limit $start,$perpage;");//根據tid正序排序,limit起始到顯示
}-->
<!--{eval $multi = multi($askscount, $perpage, $curpage, "home.php?mod=space&uid=$uid&do=thread&view=me");}-->