Versions available for this page: CUBRID 8.4.0 | CUBRID 8.4.1 |
The cubrid_lob_size() function is used to get BLOB/CLOB data size.
bool cubrid_lob_size(resource $lob_identifier )
Note The maximum length of BLOB/CLOB data is the maximum file size creatable in an external storage. The type of LOB size in CUBRID PHP is 64-bit integer, but it can’t return 64-bit integer type in PHP, so returns a string instead.
<?php
$lobs = cubrid_lob_get($con, "SELECT doc_content FROM doc WHERE doc_id=5");
echo "Doc size:".cubrid_lob_size($lobs[0]);
cubrid_lob_export($conn, $lobs[0], "doc_5.txt");
cubrid_lob_close($lobs);
?>