php查询Oracle 数据

2012 年 9 月 15 日7280

<?php
include_once("config.php");
/*
if($dbconn!=false)
{
echo "连接";
echo "DB服务器:".$db_server;
echo "用户:".$db_user;
echo "口令:".$db_pass;
echo "SID:".$db_sid;
echo "成功\n";

if(OCILogOff($dbconn)==true)
{
echo "关闭连接成功!";//=这里有问题
}
}
else
{
echo "连接失败";
}
*/

$sql = "select * from editor";
$oci_rs = oci_parse($dbconn,$sql);
oci_execute($oci_rs,OCI_DEFAULT);
while($row=oci_fetch_array($oci_rs,OCI_ASSOC)) {
print_r($row);
}
?>

0 0