Hi.. I want to fetch blob datatype of images from MYSQL database using PHP and these images displayed in Iphone Uiimageview. can anybody post some PHP code to retrieve images from mysql.
Thanks
Hi.. I want to fetch blob datatype of images from MYSQL database using PHP and these images displayed in Iphone Uiimageview. can anybody post some PHP code to retrieve images from mysql.
Thanks
Here's an exemplary tutorial: http://forum.codecall.net/php-tutorials/7663-tutorial-storing-images-mysql-php-part-ii-display-your-images.html.
The key is
...
header('Content-type: image/jpg');
echo $content;
...
Note, that the linked tutorial also shows you a good example of an sql injection vulnerability. Before assembling the query try at least something like mysql_real_escape_string()
.