class RSPage {
var $Debug = 0;
var $sqoe = 1; // sqoe= 显示错误查询
var $Link_ID = 0;
var $Record = array();
var $Row;
var $numRow;
var $Parse;
var $Error = "";
var $m_timeFmt = "YYYY-MM-DD HH24:MI:SS";
var $m_num=-1;
var $m_sql;
var $m_pageSize=10;
var $m_cmt;
var $m_curPage=1;
function open($DB_Link)
{
$this->Link_ID = $DB_Link ;
}
函数查询($Query_String,$page=1,$cnt=-1,$size=10) {
if($Query_String=="")
{
echo "执行语句不能为空!";
return false;
}
if(!$page)
$page = 1;
if(!$cnt)
$cnt = -1;
$this->m_pageSize = $size;
if($this->Parse){
mysql_free_result($this->Parse);
}
if($cnt!=-1){
$this->m_num = $cnt;
}
else{
$res ult = mysql_query( $ query_string,$ this-> link_id);
if(!$ result){
$ $ this-> error = mysql_error($ this-&this-> link_id);
}
$this->m_num = mysql_num_rows($result);
}
/*
$cntsql = "从 ($Query_String) 选择 count(*) max_num";
$maxnum = 0;
$result = mysql_query($sqlstr,$this->Link_ID);
$ret = mysql_fetch_array($result);
mysql_free_result($result);
如果(!$ ret) {
$this->Error=mysql_error($this->Link_ID);
}
else {
&