Re: Newbie: can I store flash file into Mysql DB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29 Oct 2008, at 10:32, vuthecuong wrote:

Stut wrote:

On 29 Oct 2008, at 10:20, vuthecuong wrote:
technically can I store flash file into Mysql DB using PHP?

Yes.

what point should I pay attention for that?

The blob field type.

But I would recommend against it. Why not store the files on disk and
only store the filenames in the DB?

Thanks for fast reply. Could you tell me the reason against it?

In my experience it's a lot harder to manage than files. DB backups and restores start taking a long time - not good when disaster strikes and you need to get back up and running quickly. Scripts that serve blobs can take up a lot of memory since they need to load the entire blob before outputting it to the browser whereas files can be streamed.

Google for something like store files in mysql and you'll find a lot of opinion on the advantages and disadvantages. If the files are small enough and there aren't many then it can work well, but personally I'd never do it again after some nasty experiences a few years back.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux