Re: Re: Upload File
| From: | Rory Browne | Date: | Wed, 10 May 2006 21:05:07 +0000 |
| Subject: | Re: Re: Upload File | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-235940@lists.php.net to get a copy of this message | ||
There are names for people who use the blob field of a MySQL db to store
images.
Moron, and Idiot are just two examples, but if other circumstances exist,
you can say newbie as well. As a newbie I thought myself that storing images
in a DB would be a nice clean solution. Voices of experience said otherwise..
Over the years as I grew more experienced I began to understand myself, why
putting images into a MySQL Db is a Bad Thing[tm].
Use blobs to store small amounts of transient data. Use the FS to store
something as large and semi-static as images.
Sorry if this seems rough / harsh, but if it causes a person to think twice
before using MySQL as a file storage solution, then it's justified.
There are a few less polite names for people who develop software like this
that I have to maintain later.
Are you going to write queries that involve the data *IN* the file as part of the search, sort, or filtering? PHP has the facilities built-in to perform this search/sort/filter - whiletheir use isn't always the cleanest solution, anything is better than putting files in a db. If you can't find the features you require, then feel free to use external tools - anything to avoid db file storage.