duanjia4969 2011-02-07 10:29
浏览 58

Oracle异常显示为PHP警告而非错误

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

My problem is that whenever the 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?

  • 写回答

1条回答 默认 最新

  • dslijian2015 2011-02-07 10:50
    关注

    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.

    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向