class OCI-Lob 的对象无法转换为字符串
Object of class OCI-Lob could not be converted to string
我试图在 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);
我试图在 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);