<?
$host = "localhost";
$db = "test";
$user = "test";
$pwd = "password";
 
Java("oracle.jdbc.driver.OracleDriver");
$conn = Java("java.sql.DriverManager")->getConnection("jdbc:oracle:thin://$host/$db", $user, $pwd);
$stmt = $conn->createStatement();
$rs = $stmt->executeQuery("SELECT * FROM TAB");
 
while( $rs->next() ){
 printf( $rs->getData("column1"), $rs->getString("column2") );
}
?>

+ Recent posts