Trying to process images embedded in a Db field

Discussion in 'PHP' started by classifieds, Aug 24, 2007.

  1. #1
    I have a MS-Access database on a linux server (using obdc) that has images embedded in one of the fields (INMPICTURE below).

    It used to be a coldfusion application running on Windows. The coldfusion code that processed the images was:
    
    <cfquery name="InmateDetail" datasource="jailsearch">
        SELECT INMPICTURE
        FROM dbo_Results
        WHERE INMPICTURE IS NOT NULL AND BOOKNO = <cfqueryparam cfsqltype="cf_sql_clob" value="#URL.BOOKNO#">
        
        </cfquery>
        
        <cfcontent type="image/jpeg"><cfoutput>#ToString(InmateDetail.INMPICTURE)#</cfoutput>
    Code (markup):

    We've moved to Linux (LAMP) and I'm trying to figure out how to read and process the images via php. I just want to display it on a web page along with the other data in the record - nothing fancy.

    Here's a sample of the php odbc code for reading the text data:
    <?php 
    $myDB = odbc_connect("Jail","","");
    $query ="select LNAME,FNAME from dboResults";
    $result = odbc_exec($myDB, $query);
    while (odbc_fetch_row($result)) {
    	print odbc_result($result,"FNAME") . " &nbsp;".odbc_result($result,"LNAME")."<br>";	
    }
    
    ?>
    
    Code (markup):
    I will pay If someone can figure this out and give me a sample code snippet.


    -jay


    The database is located here: http://www.file123.com/Transfer.aspx?guid=4cc50b78-ec9c-474e-823e-841e45a7b083


    The Access Db Fields in the table are:

    BOOKNO: Unique Inmate ID
    LNAME: Last Name
    FNAME: First Name
    MNAME: Middle Name
    DOB: Date of Birth
    RACE: Race
    SEX: Gender (male/female)
    BOOKDATE: Date they were booked into the jail
    INMPICTURE: Photo of inmate as OLE/Object Field
    InmateReleaseTime: Date they will be released from jail.
     
    classifieds, Aug 24, 2007 IP
  2. classifieds

    classifieds Sopchoppy Flash

    Messages:
    825
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    150
    #2
    $50.00 to the first person that shows me how to do this correctly. . .

    -jay
     
    classifieds, Aug 27, 2007 IP
  3. ssanders82

    ssanders82 Peon

    Messages:
    77
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    PM'd you an answer
     
    ssanders82, Aug 27, 2007 IP