Jump to content


Photo

Problem with CLOB


  • Please log in to reply
1 reply to this topic

#1 riteshrm

riteshrm
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 04 April 2006 - 10:14 AM

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...

#2 svetbg

svetbg
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 18 September 2006 - 07:36 AM

$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";
    }
}





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users