Re: Re: jpgs into database
| From: | glumtail | Date: | Mon, 18 Jul 2005 17:58:23 +0000 |
| Subject: | Re: Re: jpgs into database | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-218882@lists.php.net to get a copy of this message | ||
I heard that Microsoft.com <http://Microsoft.com> stores
every images in
database.
Maybe the cost is the most important thing.
2005/7/19, George B <geoizil@gmail.com>:
>
> Matthew Weier O'Phinney wrote:
> > * Jasper Bryant-Greene <jasper@bryant-greene.name> :
> >
> >>George B wrote:
> >>
> >>>is it possible to put in a jpg file into a database? I am trying to
> make
> >>>like a catalong and have all the files (including pics) and everyone
> can
> >>>see.
> >>>is this possible?
> >>
> >>Sure -- if you're using a MySQL database, just use a BLOB field and put
> >>the data in as you would a string of text.
> >
> >
> > Be aware of your storage requirements, however. There are several BLOB
> > types -- TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB -- so make certain you
> > choose the one that exceeds the maximum file size you expect to place in
> > the DB.
> >
> > Additionally, there are performance hits to storing images in a
> > database. Another approach that is widely used is to store the images on
> > the filesystem, and then image *details* -- location, size, caption,
> > photographer, etc. -- in the database. This is typically faster, and
> > will reduce the number of DB calls.
> >
> yeah that probably is a better idea :)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>