Click to See Complete Forum and Search --> : Data-Type MySQL Storage . . .


misteralexander
10-08-2008, 01:58 PM
Hello all,

I'm very, very new to MySQL. I am reading a book to help me along, called "PHP & MySQL" by "Larry Ullman".

In it, he says you can only store "Text, Numbers, & Data" in a database. He defines "Data" as user-names, passwords . . . etc, etc. I'm wanting to create a database that stores Photos (JPEG's). Is this possible?:confused: Is it possible to store actual FILES in a database?:confused: Or must you simply relate their location on a hard-drive to the database (ie: file-location-/home/user/photo/1.jpg) without actually storing the FILE itself into a database.

Then again, maybe I'm just so backward and so confused with this principle, I'm just getting everything backward.:eek:

Any help is still help!:D

Thanks for your time!;)

LANGuru
10-08-2008, 03:18 PM
I have been interested in this in the past and have found it much easier to upload the image then insert the filename into the database. From what I have read it is doable.

Here is a tutorial about it:

http://www.phpriot.com/articles/images-in-mysql

Clark

chazzy
10-08-2008, 07:23 PM
while it's doable, it's not recommended for performance reasons.