Home  >  Article  >  Backend Development  >  PHP怎么连接ORACLE并且取出数据

PHP怎么连接ORACLE并且取出数据

WBOY
WBOYOriginal
2016-06-13 12:37:39868browse

PHP如何连接ORACLE并且取出数据
我的环境,APACHE2.2 php5.2.17 win2003 已经安装了oracle 9i 的数据库

1,如何连接,我PHP.INI里面去掉了extension=php_oci8.dll,但是在PHPINFO里面还是看不到OCI8的扩展,找了下说要下载一个instantclient-basic-nt-11.2.0.3.0 然后添加到系统变量里面。我试过了还是不行,我是这样连接的
 $link=oci_connect('user','pass','instance')or die ('连接失败'); //oci_connect(用户,密码,实例名)不知道是这样么

页面提示 Fatal error: Call to undefined function oci_connect() 



2,如果连接到了ORACLE,怎么样取得结果集。好像PHP手册里面并没有ORC之类的说明。
一般mysql取出数据一般是用mysql_fetch_assow(mysql_query('select * from number'))这样来取,那对应的oracle应该也有这样的函数来。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn