我试图从 CodeIgniter 中的 Oracle 数据库访问 CLOB 类型字段的数据,但收到以下错误:
Message: Object of class OCI-Lob could not be converted to string
var_dump 得到如下结果后:
最佳答案
The Oracle “CLOB” (Character Large Object) is a data type used to store up to 4 Gigabytes of text.
To get the CLOB contents you will need to call the load() or read() methods on the returned object. The latter will require the length of data to read in bytes but has the advantage of not being limited by the script memory limit.
例子:
$result->FORUM_DESC->load();
或者
$result->FORUM_DESC->read(2000);
Source.
关于php - 类 OCI-Lob 的对象无法转换为字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53455147/