怎么没有人呀,,大家看看吧,<?php
header("content-Type: text/html; charset=gb2312");
putenv("ORACLE_SID=lxtest");
putenv("ORACLE_HOME=/u04/app/oracle/product/8.1.7");
$handle = ora_plogon("test","test","lxtest") or die;
$cursor = ora_open($handle);
ora_commitoff($handle);
$query = "SELECT * FROM cd";
ora_parse($cursor, $query) or die;
ora_exec($cursor);echo "<HTML><PRE>\n";
echo "$query\n\n";
$numcols = 0;
while(ora_fetch($cursor)) {
$numcols = ora_numcols($cursor);
for ($column=0; $column < $numcols; $column++) {
$data = trim(ora_getcolumn($cursor, $column));
if($data == "") $data = "NULL";
echo "$data\t";
}
echo "\n";
}
$numrows = ora_numrows($cursor);
echo "\nROWS RETURNED: $numrows\n";
echo "</PRE></HTML>\n";ora_close($cursor);?>
header("content-Type: text/html; charset=gb2312");
putenv("ORACLE_SID=lxtest");
putenv("ORACLE_HOME=/u04/app/oracle/product/8.1.7");
$handle = ora_plogon("test","test","lxtest") or die;
$cursor = ora_open($handle);
ora_commitoff($handle);
$query = "SELECT * FROM cd";
ora_parse($cursor, $query) or die;
ora_exec($cursor);echo "<HTML><PRE>\n";
echo "$query\n\n";
$numcols = 0;
while(ora_fetch($cursor)) {
$numcols = ora_numcols($cursor);
for ($column=0; $column < $numcols; $column++) {
$data = trim(ora_getcolumn($cursor, $column));
if($data == "") $data = "NULL";
echo "$data\t";
}
echo "\n";
}
$numrows = ora_numrows($cursor);
echo "\nROWS RETURNED: $numrows\n";
echo "</PRE></HTML>\n";ora_close($cursor);?>
解决方案 »
- php基础缓存问题请教
- Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resour
- 一个sql查询,大侠帮忙看看
- 在.html里嵌套php代码好不
- php
- 求一条mysql查询语句问题
- mysql建表问题
- MySQL 错误 Warning: Supplied argument is not a valid MySQL result resource in
- php分页后的问题求大家帮帮忙
- php 点击按钮撤销上一步对数据库的操作
- php一在服务器上运行,就弹出一个安全登陆的对话框,让我输用户名和密码,而放在该目录下的ASP文件却是好的?
- 网页之间不能传递变量 为什么?
OCIExecute($stmt);
OCIFreeStatement($stmt);
OCILogOff($conn); 这是我在 ce.cn 写的程序,已经成功使用.你试试.用 OCI 的函数写的.没有用 ORA