Reply to Re: PHP retrieve image from Mysql database

Your name:

Reply:


Posted by lorento on 06/08/06 07:04

"webmechanic" wrote :
> I was able to insert images into mysql stored as binary data.

because its a binary data you can just echo the content data. Try like
this :

<?php
$query = "SELECT blobfield FROM table WHERE ????";
$result = mysql_query($query, $dbc);
$result_data = mysql_fetch_array($result, MYSQL_ASSOC);


header("Content-type: image/jpeg") ;
echo $result_data['blobfield'];

?>

regards,

Lorento
--
http://blogs.deshot.com
http://www.mastervb.net
http://www.immersivelounge.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация