<?php
//include source of oracle-db class
//don't forget to create folder "log" in current directory, where class creates error log file if you pass invalid sql
require_once('db.class.php');
//define connection parameters:
//login to database (scheme name)
//password to database
//database name - like in tnsnames.ora
$dbs['TESTDB'] = array("login", "password", "test_db");
//create instance of testdb database
$db = new database($dbs['TESTDB']);
//define sql script
$sql = "select test_a, test_b from xyz";
//select data by sql script ad store results in associative array $ret
$ret = $db->_select($sql);
//print results
print_r($ret);
//array will look like
//array(
// "test_a"=>array("a1","a2", "a3"),
// "test_b"=>array("b1", "b2", "b3")
//);
?>
|