hi all
when i configured PDO_OCI library installed my oracle connection is working
and i used following url to check my oracle oci connection
http://www.phpro.org/manual/function.oci-connect.html
is working fine or not?
and to tell you all
these following urls also helped me to achieve this
http://www.idevelopment.info/data/Oracle/DBA_tips/Database_Administration/DBA_26.shtml
http://www.yiiframework.com/forum/index.php?/topic/6139-problem-with-oracle-pdo-connectivity/
see my code
<?php
ini_set('display_errors', 1);
ini_set('log_errors', 1);
ini_set('error_log', dirname(__FILE__) . '/error_log_test_display3.txt');
error_reporting(E_ALL);
/* oci_define_by_name example - thies at thieso dot net (980219) */
$conn = oci_connect("scott", "tiger");
$stmt = oci_parse($conn, "SELECT empno, ename FROM emp where ename like 'M%'");
/* the define MUST be done BEFORE oci_execute! */
oci_define_by_name($stmt, "EMPNO", $empno);
oci_define_by_name($stmt, "ENAME", $ename);
oci_execute($stmt);
while (oci_fetch($stmt)) {
echo "empno:" . $empno . "\n";
echo "ename:" . $ename . "\n";
echo "<br>";
}
oci_free_statement($stmt);
oci_close($conn);
?>