+ -
当前位置:首页 → 问答吧 → PHP怎么操作oracle语句

PHP怎么操作oracle语句

时间:2011-09-22

来源:互联网

请资深人士介绍下!!!

作者: liudong   发布时间: 2011-09-22

php操作oracle跟操作mysql区别不大,下面是一个实例代码
PHP code

public function query($selectsql){
         $this->conn=oci_connect($this->_userName,$this->_password,$this->_dbName,$this->_charSet);
         $stmt = oci_parse($this->conn,$selectsql);
         oci_execute($stmt);
        while($row=oci_fetch_array($stmt,OCI_ASSOC+OCI_RETURN_LOBS)){
            $qustionresult[]=$row;    
        }
        oci_close($this->conn);
        return $qustionresult;
     }



记得要把php_oci8扩展打开

作者: A82168506   发布时间: 2011-09-22

不懂 能再详细点嘛 第一次用orcle开发

作者: liudong   发布时间: 2011-09-22

public function query($selectsql){
  $this->conn=oci_connect($this->_userName,$this->_password,$this->_dbName,$this->_charSet);
  $stmt = oci_parse($this->conn,$selectsql);
  oci_execute($stmt);
  while($row=oci_fetch_array($stmt,OCI_ASSOC+OCI_RETURN_LOBS)){
  $qustionresult[]=$row;  
  }
  oci_close($this->conn);
  return $qustionresult;
  }



作者: fuhualangman   发布时间: 2011-09-22

热门下载

更多