A Dumb Noob Question - Will MySQL Store jpegs?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
BobH - TAN
Forum Newbie
Posts: 20
Joined: Mon Mar 20, 2006 7:09 pm
Location: Texas

A Dumb Noob Question - Will MySQL Store jpegs?

Post by BobH - TAN »

Realizing that I'm a noob (despite advanced years and despite years of mainframe experience), I realize that there is probably an answer to this somewhere. So far, I haven't phrased the question correctly for Google to point me to an answer. The closest I've come is to a cryptic statement that the issue was already covered in a forum and in the docs. What I want to do is store thumbnail sized jpg's from a high school yearbook along with name and other information about classmates and be able to retrieve and display it based on a search function. I'll probably also store recent pics too.

Could someone point me to a specific location where I can read up on this? There's so much information and my search skills are so inadequate.

TIA
Last edited by BobH - TAN on Wed Mar 29, 2006 11:58 am, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

yes it can, technically. But it is not recommended. Why? In order to display the image, you'll have to make a reference to a PHP script as the image. This reference will need to query and extract the binary data from the database server. This causes more server load than is necessary. Instead, it is often suggested to use the filesystem to store the files. That's what it's built for.

If you want to read previous threads on this, use the search *blob* as the keyword string (with the both asterix)
BobH - TAN
Forum Newbie
Posts: 20
Joined: Mon Mar 20, 2006 7:09 pm
Location: Texas

Thanks, Feyd!

Post by BobH - TAN »

I'll do the search. Might have to come back and ask you more about the storage and retrieval of the jpg's tho.
BobH - TAN
Forum Newbie
Posts: 20
Joined: Mon Mar 20, 2006 7:09 pm
Location: Texas

Read Enough of the "jpg" Search Replies to Underst

Post by BobH - TAN »

. . . my approach was all wet. Thanks, Feyd!

Guess I'll just upload 500+ thumbnails to my hosted server.

Thanks again!
Post Reply