note 29648 deleted from function.imagejpeg by cmb
| From: | cmb@php.net | Date: | Sun, 20 Oct 2019 08:56:43 +0000 |
| Subject: | note 29648 deleted from function.imagejpeg by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212715@lists.php.net to get a copy of this message | ||
Note Submitter: crazyted at crazyted dot com
----
In regards to adding images (or any other binary file) to a database, unless you absolutely *have*
to, a MUCH better solution is to simply save the file you create to a directory and update your
database with a URL to this file.
When I first started DB development I was hung up with BLOBs and how to make them effectively work
with PHP but realized that they can severely impact performance and you also limit what you can do
with those files once they're inside the DB.
If you can avoid using BLOBs, and most people can, then by all means just create a look-up table for
your file urls and save them to a directory to store the files. File access and scalability will be
greatly increased in most cases.