Home  >  Article  >  Backend Development  >  这句PHP操作MYSQL的代码要如何改才能操作ORACLE

这句PHP操作MYSQL的代码要如何改才能操作ORACLE

WBOY
WBOYOriginal
2016-06-13 13:51:55758browse

这句PHP操作MYSQL的代码要怎么改才能操作ORACLE?
$sql1= "select   *   from   s_sblb ";
  $rst1=mysql_query($sql1);
  $ar=mysql_num_rows($rst1);

现在要改成ORACLE的,其中的两个函数要怎么改?谢谢

------解决方案--------------------
http://cn.php.net/manual/zh/ref.oci8.php

建议你用ADODB
------解决方案--------------------
$sql= "select * from s_sblb ";
$result=OciParse($DBCONN,$sql);
ociexecute($result);

while (OciFetchInto ($result, &$arr))
{
$js = ' ';
echo $js;
echo "$arr[0] ";
}

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