rameshfaj Posted January 23, 2008 Share Posted January 23, 2008 I have some BLOB objects(say images) uploaded in the mysql tables. Now I want to display the image in the page via PHP.How can I do this?Can anyone provide me some code snippets or logic how to do this? Quote Link to comment https://forums.phpfreaks.com/topic/87351-reading-blob-values/ Share on other sites More sharing options...
pdkv2 Posted January 23, 2008 Share Posted January 23, 2008 <?php $sql = "SELECT blob FROM table WHERE condition etc"; $res = mysql_query($sql, $link); $result_data = mysql_fetch_array($res, MYSQL_ASSOC); $image = imagecreatefromstring($result_data['blob']); ?> Regards, Sharad Quote Link to comment https://forums.phpfreaks.com/topic/87351-reading-blob-values/#findComment-446862 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.