//请教 //You have an error in your SQL syntax near '' at line 1//这个类的一个函数 function ReadList() { $SQL="SELECT Count(*) AS total FROM ".$this->Table." ".$this->Condition; $result=mysql_query($SQL) or die(mysql_error()); $row=mysql_fetch_Array($result); $this->Total=$row[total]; if($this->Total>0) { //根据条件 Condition $SQL="SELECT * FROM ".$this->Table." ".$this->Condition. " LIMIT ".$this->Offset." , ".$this->MaxLine; $result=mysql_query($SQL) or die(mysql_error()); $this->Number=mysql_num_rows($result); while($row=mysql_fetch_Array($result)) $this->Result[]=$row; } return $this->Result; }
//You have an error in your SQL syntax near '' at line 1//这个类的一个函数
function ReadList() {
$SQL="SELECT Count(*) AS total FROM ".$this->Table." ".$this->Condition; $result=mysql_query($SQL) or die(mysql_error());
$row=mysql_fetch_Array($result);
$this->Total=$row[total]; if($this->Total>0) { //根据条件 Condition
$SQL="SELECT * FROM ".$this->Table." ".$this->Condition.
" LIMIT ".$this->Offset." , ".$this->MaxLine; $result=mysql_query($SQL) or die(mysql_error());
$this->Number=mysql_num_rows($result); while($row=mysql_fetch_Array($result)) $this->Result[]=$row;
}
return $this->Result;
}