时间:2021-07-01 10:21:17 帮助过:29人阅读
    //显示当前所在页数
    function getCurrenPages() {          
        return $this->CPages;
    }
    
    function myQuery($sql, $flag=1){
            GLOBAL $offset;
            $this->Query = $sql;
        
        // 获取文件名
        //$this->FilePath = $GLOBALS["REQUEST_URI"];
            $this->FilePath = $GLOBALS["SCRIPT_NAME"];
            
            // 获取查询条件
            $this->QueryString = $GLOBALS["QUERY_STRING"];            
            //echo $this->QueryString . "
";            
            
            // 截取 " from " 以后的 query 语句
   &nbs
MySQL教程是:php入门mysql分页PageQuery类。p;        $this->QueryPart = trim(strstr($sql, " from "));
            
            // 计算偏移量
            if (!isset($offset)) $this->Offset = 0;
            else $this->Offset = (int)$offset;