开发者

Oracle exceptions displayed as PHP warnings not errors

I'm interacting with an Oracle database using the oci8 interface.

My problem is that whenever th开发者_Go百科e Oracle code raises an exception with an appropriate message and code, PHP emits a warning and not an error.

I need access to the error code, but oci_error always returns false (presumably because it is a warning not an error).

Is there any way to cause these warnings to be shown as errors and correctly populate the call to oci_error?


Turns out I was using the API incorrectly, when calling oci_error, you have to pass in the statement resource. This resulted in getting the correct error information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜