- 论坛徽章:
- 0
|
<?php
PutEnv("ORACLE_SID=lee");
$oraUser="test";
$oraPass="test";
$oraDB="(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))(CONNECT_DATA=(SID=lee)))";
$connection = OCILogon($oraUser,$oraPass,$oraDB) or die("ORACLE server未启动,请与系统管理员联系.");
if ( $connection == false )
{
echo OCIError($connection)."";
exit;
}
$query = "select id from v_guide where mis2id is null";
$cursor = OCIParse( $connection, $query );
if( OCIExecute( $cursor ) )
{
echo OCIExecute( $cursor )."\n";
while ( $row = OCIFetch($cursor))
{
echo "1:".$row['id'];
}
}
OCICommit ($connection);
OCILOGOff ($connection);
?>
我的echo OCIExecute( $cursor )答应出来是有值,显示为1,但是为什么echo "1:".$row['id']为空呢? |
|