错误:此功能不适用于您正在使用的数据库

hsu*_*suk 5 php sql oracle codeigniter

我在Codeigniter中使用oci8作为我的数据库驱动程序.使用以下调用存储过程的代码时给出了错误:

$this->db->call_function('update_letter_body', $body_letter, $insert_id);

Error : This feature is not available for the database you are using.
Run Code Online (Sandbox Code Playgroud)

应该怎么做才能使这项工作?

我试图设置一个超过4000个字符的值,这似乎不能直接查询,似乎codeigniter不支持调用oracle的函数.有什么建议 ?

Kan*_*iya 7

嗯,试试吧

$this->db->query("CALL update_letter_body(".$body_letter.",".$insert_id.")");
Run Code Online (Sandbox Code Playgroud)

call_function 使您能够调用本机不包含在CodeIgniter中的PHP数据库函数,而不是调用您编写的程序.

检查文档

https://www.codeigniter.com/user_guide/database/call_function.html