私は私のオラクルのデータを持っているとコード・イグナイタのエラー・クローブ(oracle)値、それを解決する方法は?
$this->db->select('detail');
$r = $this->db->get($tableName);
$result = $r->result();
ますprint_r($結果)CodeIgniterのからそれを取り出す:データを取得
function get_ora_blob_value($value)
{
$size = $value->size();
$result = $value->read($size);
return ($result)?$result:NULL;
}
:
echo $this->data->get_ora_blob_value($result[0][DETAIL]); // should be 'remark1'
echo "<br />";
echo $this->data->get_ora_blob_value($result[1][DETAIL]); // should be null
echo "<br />";
echo $this->data->get_ora_blob_value($result[2][DETAIL]); // should be 'remark2'
を
Array
(
[0] => stdClass Object
(
[DETAIL] => OCI-Lob Object
(
[descriptor] => Resource id #80
)
)
[1] => stdClass Object
(
[DETAIL] =>
)
[2] => stdClass Object
(
[DETAIL] => OCI-Lob Object
(
[descriptor] => Resource id #80
)
)
)
データモデル
印刷:
remark2
(empty)
(empty)
なぜ最初のデータには3番目のデータの値がありますか? 3番目のデータが空になりますか?
'print_r($ r-> result_array())'の結果はどうなりますか? 'foreach($ result as $ single_result)'を使ってデータを検索すると何が印刷されますか? – castt