$this->sErr="GetValue:所请求的列不存在,请仔细检查!"; return; } return $aResult[$i]; } return $aResult; }
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=mysql_query($strSQL)) { $this->nErr=1; $this->sErr="AddNew:SQL语句:".strSQL."
MySql错误:".mysql_error(); return; } $this->nCols=mysql_num_fields($this->nResult); unset($this->aFName);
上一篇:分享:Sql server 2005数据库安装心得
下一篇:如何让Oracle数据不丢失?
|