Getting ORA Oracle error code using PHP function oci_connect?

Posted by me_here on Stack Overflow See other posts from Stack Overflow or by me_here
Published on 2009-03-25T11:18:07Z Indexed on 2010/06/07 8:12 UTC
Read the original article Hit count: 254

Filed under:
|

The PHP function oci_connect (which connects to an Oracle database) just returns false if it fails, which at the moment I handle like this:

$connection = oci_connect($username, $password, $database);
if (!$connection){
	return $result = "Trouble connecting to the Oracle Database";
}

But really I'd like to have the actual ORA error code, so I can be more informative. Is this possible?

© Stack Overflow or respective owner

Related posts about php

Related posts about Oracle