Below is a useful wraper of functions i know works in php and ora8 as long as you have the odbi libs.
<?php
putenv("ORACLE_HOME=HOME");
putenv("ORACLE_SID=sid");
putenv("ORACLE_BASE=/home/oracle");
$db_host = "";
$db_user = "";
$db_password = "";
$db_database = "";
$connection = 0;
$stmt = 0;
function db_connect() {
global $db_user;
global $db_password;
global $db_database;
global $connection;
$connection = ociplogon($db_user,$db_password,$db_database);
if (!$connection) {
header("Location: error.php");
}
}
function db_query($myquery) {
global $connection;
global $stmt;
$stmt = ociparse($connection, $myquery);
ociexecute($stmt,OCI_COMMIT_ON_SUCCESS);
return $stmt;
}
function db_fetch_array($stmt) {
ocifetchinto($stmt,$aresult,OCI_ASSOC+OCI_RETURN_NULLS);
return $aresult;
}
function db_affected_rows() {
global $stmt;
return ocirowcount($stmt);
}
function db_num_rows($myquery) {
global $connection;
$stmt = ociparse($connection, $myquery);
ociexecute($stmt,OCI_DEFAULT);
ocifetch($stmt);
$temp = ociresult($stmt, 1);
return $temp;
}
db_connect();
?>