|
function AddNew($TableName="") //标志开始添加数据 { $this->Initialize(); if(!empty($TableName)) $this->sTName=$TableName; if($this->NewEdit>0) { $this->nErr=1; $this->sErr="AddNew:你正在对数据库进行添加或更新操作!"; return; } if(empty($this->sTName)) { $this->nErr=1; $this->sErr="AddNew:想要添加的数据库表为空,可以在构造时指定,也可在AddNew()时指定!"; return; } unset($this->aNew); $this->aNew=array(); $this->NewEdit=1; $strSQL="select * from ".$this->sTName; $this->sSQL=$strSQL; if(!$this->nResult=sql/Index.html'>mysql_query($strSQL)) { $this->nErr=1; $this->sErr="AddNew:SQL语句:".strSQL."
MySql错误:".sql/Index.html'>mysql_error(); return; } $this->nCols=sql/Index.html'>mysql_num_fields($this->nResult); 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] 下一页
|