Jump to content

Archived

This topic is now archived and is closed to further replies.

riteshrm

Problem with CLOB

Recommended Posts

I have CLOB as one of my table field types. When I try to print the value, it gives something like Resource id #6. Someone help me out...

Share this post


Link to post
Share on other sites
$sql = "SELECT message FROM watchdog"; // message is of CLOB type
$parsed = oci_parse($c, $sql);

I.
if (oci_execute($parsed)) {
    $numrows = oci_fetch_all($parsed, $tmpArr, 0, 1000);
    for ($i=0; $i<$numrows; $i++) {
        echo $tmpArr["MESSAGE"][$i] . "\n";
    }
}

II.
if (oci_execute($parsed)) {
    while ($row = oci_fetch_array($parsed, OCI_ASSOC)) {  
        $result = $row["MESSAGE"];
        echo $result->load() . "\n";
    }
}

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.