image help...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

image help...

Post by pleigh »

hi there,

will it be possible to store picture files to mysql? if yes, how can i do it?

thanks in advance.

pleigh :lol:
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

search.. we've talked about it ad naseum. I've posted the pros and cons (mostly cons) about storing images directly in MySQL multiple times.

"image database"
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Essentially it boils down to making a blob or mediumblob field in your table, reading in the data of the image and storing it in that field. To pull the data out, make a particular file that you'd call in HTML code rather than the image file, sending a GET variable corresponding to the ID of the image. But like feyd said, do a search.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Binary Data + MySQL + PHP
How to Store Images Directly in the Sql Database
http://www.phpbuilder.com/columns/florian19991014.php3
Post Reply