1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2011
    Rep Power

    Get Data from CLOB

    Hey All,

    I'm writing a PHP page to display some data from an Oracle database. Unfortunately, I can't copy the code because it's proprietary, but I'm having an issue I was hoping somebody could help me with. One of the columns in the db is of type CLOB. I'm having trouble getting the data from the CLOB column.

    The way the code is now, is there is a query string read into a variable, and the query string variable is read into a function that then retrieves the data from the db. Once the result set is returned, it is parsed to get data from all of the columns. The issue is that I've never worked with CLOB data before, so I'm having some difficulty extracting the data for that column. I know I can use the DBMS_LOB.READ function, but I'm not sure how to apply it in this case. The following is a generic form of the query string I'm using with b.clob_col being the column I'm having issues with.

    $queryString = <<<EOD
    SELECT a.col1,
    from table1 b
    inner join b.col4
    on blah1
    inner join a.col2
    on blah2
    where blah
    and blah

    Any help is appreciated!!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2007
    Rep Power
    One thread is enough!

    Regards, J.

IMN logo majestic logo threadwatch logo seochat tools logo