PHP : Function Reference : Oracle Functions : oci_close
Examples ( Source code ) » oci_close
<?php
function do_query($c, $query)
{
$s = oci_parse($c, $query);
oci_execute($s);
oci_fetch_all($s, $res);
echo "<pre>";
var_dump($res);
echo "</pre>";
}
$c1 = oci_connect('hr', 'hrpwd', '//localhost/XE');
$c2 = oci_connect('hr', 'hrpwd', '//localhost/XE');
do_query($c1, 'select user from dual');
oci_close($c1);
do_query($c1, 'select user from dual'); // fails
do_query($c2, 'select user from dual'); // succeeds
oci_close($c2);
?>
|