2 Replies Latest reply on May 12, 2011 10:49 AM by ShardulSingh

    Bytearray to image Data

    l33tian Level 1

      hello folks,

      I'm trying to display an image i got from a bytearray returned by an AMFPHP RPC call, This bytearray was saved into a MYSQL database BLOB field. here is a snippet of my PHP code

           $db=new DBHandler();
           $sql="INSERT INTO profile (profile_id,image) VALUES('$profile_id','$imageData')";
           return $db->update($sql);


      The addslash() function just escapes chraccter that would mess up my sql statement.


      When i make a call to retrieve this record from my flex application. it doesnt display anything when i try to read bytearray. I assigned the byterray directly to source property of the image control. Do i need to do anything to bytearray i recieved. Did the addslash() function mess up the binary data?.


      Help anyone!