"); // Connects to the orcl service (i.e. database) on the "localhost" machine $conn = oci_connect('Scott', 'Son', '//manas2/orcl'); if (!$conn) { $e = oci_error(); trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR); } echo "
"; echo "Server Version: " . oci_server_version($conn); echo"
"; echo"-------EMP Table---------------------"; $stid = oci_parse($conn, 'SELECT * FROM emp'); //$stid = oci_parse($conn, 'SELECT ENAME, JOB FROM emp'); oci_execute($stid); echo (""); echo (" \n"); while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) { echo "\n"; foreach ($row as $item) { echo " \n"; } echo "\n"; } echo "
emp NoenamejobMGRHire-dtsalcommdept.no
" . ($item !== null ? htmlentities($item, ENT_QUOTES) : " ") . "
\n View code \n"; oci_free_statement($stid); oci_close($conn); echo(" oracle_test2.txt"); ?>