|
function Query($TableName="",$SQL="*",$Condition="",$Order="",$Sequenc="") //在数据库里执行查询 { $this->Initialize(); if(!empty($TableName)) $this->sTName=$TableName; $strSQL="select ".$SQL." from ".$this->sTName; if(!empty($Condition)) $strSQL=$strSQL." where ".$Condition; if(!empty($Order)) $strSQL=$strSQL." order by ".$Order; if(!empty($Sequenc)) $strSQL=$strSQL." ".$Sequenc; $this->sSQL=$strSQL; if(!$this->nResult=sql/Index.html'>mysql_query($strSQL)) { $this->nErr=1; $this->sErr="Query:SQL语句:".$strSQL." MySql错误:".sql/Index.html'>mysql_error()." "; return; } $this->nOffset=0; $this->nRows=sql/Index.html'>mysql_num_rows($this->nResult); $this->nCols=sql/Index.html'>mysql_num_fields($this->nResult); if($this->nRows>0) $this->EOF=false; else $this->EOF=true; unset($this->aFName); $this->aFName=array(); for($i=0;$i<$this->nCols;$i++) $this->aFName[$i]=strtolower(sql/Index.html'>mysql_field_name($this->nResult,$i)); }
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页
|