正在阅读:分页显示Oracle数据库记录的类之一分页显示Oracle数据库记录的类之一

2004-02-14 09:33 出处:奥索网 作者:sharetop 责任编辑:zwg
//-------------------------------- // Get 函数 //-------------------------------- //取记录总数 function GetTotalRec(){ $SQL="SELECT Count(*) AS total FROM ".$this->Table." ".$this->Condition; $stmt = OCIParse($this->LinkId,$SQL); $bool = OCIExecute($stmt); if (!$bool) { echo "连接失败!"; OCILogoff($this->LinkId); exit; } else { OCIFetch($stmt); $this->Total=OCIResult($stmt,1); } OCIFreeStatement($stmt); } //取总页数、当前页 function GetPage(){ $this->TPages=ceil($this->Total/$this->MaxLine); $this->CPages=ceil($this->Offset/$this->MaxLine)+1; } //取总组数、当前组 function GetGroup() { $this->TGroup=ceil($this->TPages/$this->PGroup); $this->CGroup=ceil($this->CPages/$this->PGroup); }
键盘也能翻页,试试“← →”键

相关文章

关注我们

最新资讯离线随时看 聊天吐槽赢奖品