<?php
$conn=OCILogon("Raju", "Password", "DATABASE_NAME");
if ( ! $conn ) {
echo "Unable to connect: " . var_dump( OCIError() );
die();
}
$query = "SELECT * FROM Company";
$result = OCIParse($conn, $query);
OCIExecute($result, OCI_DEFAULT);
while (OCIFetchInto ($result, $row, OCI_ASSOC)) {
if (OCIcolumnisnull($result, 'CompanyName')) {
print ( "<P>" . $row['CompanyID'] . "--->" . "Company Name NOT found !! " . "<P>" );
}
else {
print ("<P>" . $row['CompanyID'] . "--->" . $row['CompanyName'] . "<P>" );
}
}
OCILogoff($conn);
?>