You are here: Re: PHP retrieve image from Mysql database « PHP Programming Language « IT news, forums, messages
Re: PHP retrieve image from Mysql database

Posted by Norman Peelman on 06/07/06 22:29

"webmechanic" <dmitrymar@yahoo.com> wrote in message
news:1149693940.744768.258410@g10g2000cwb.googlegroups.com...
> I was able to insert images into mysql stored as binary data. How do I
> retrieve it. Please provide thorough explanation. Thanks.
>

Do your SELECT:

$query = "SELECT blobfield FROM table WHERE ????";

$result = mysql_query($query, $dbc);
$result_data = mysql_fetch_array($result, MYSQL_ASSOC);
$img = imagecreatefromstring($result_data['blobfield']);

---

Just lookup the exact function parameters as that is just off the top off my
head...

Norm
--
FREE Avatar hosting at www.easyavatar.com

 

Navigation:

[Reply to this 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

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