| 网站首页 | JAVA文章 | AppServers | Web开发 | 应用开发 | 资源下载 |
    想学好编程,外语很重要,最新的编程技术还是在国外  [enadd  2006年12月25日]        
设为首页 加入收藏 联系站长
您现在的位置: 编程笔记网 >> 数据库 >> mysql >> 使用实例 >> 文章正文
Mysql数据库的操作类(已封装)            【字体:
Mysql数据库的操作类(已封装)
作者:不详    文章来源:网络    点击数:    更新时间:2007-1-21

    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] 下一页  

文章录入:enadd    责任编辑:enadd 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
  • MySQL数据的导出和导入工具:…

  • mysql授课大纲

  • mysql技巧总结

  • PPTP + MPPE + RADIUS + MyS…

  • 使用函数递归实现基于php和M…

  • 基于MySQL的高性能数据库应用…

  • Mysql日期和时间函数

  • 深圳讯天 mysql 服务器错误分…

  • 几分钟让你走进mysql的门

  • 针对 Apache 2.x 的 MySQL 用…

  •   网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    | 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | 管理登录 |