Re: is there any syntax to save a file in mysql?

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

 



On Mon, 2011-03-28 at 07:36 +0200, Hans Ãhlin wrote:

> 2011/3/28 Negin Nickparsa <nickparsa@xxxxxxxxx>:
> > in php i have a file to upload i want to save this file in a table and then
> > retreive it from table in another situation is it possible?
> >
> I assume you are thinking of saving it in a MySQL table?
> If so read this http://dev.mysql.com/doc/refman/5.0/en/blob.html
> 
> 
> -- 
> 
> 
> **********************************************
>  Hans Ãhlin
>    Tel: +46761488019
>    icq: 275232967
>    http://www.kronan-net.com/
>    irc://irc.freenode.net:6667 - TheCoin
> **********************************************
> 


Personally, I'd save the file as a file but use the DB to remember
details about it. For example, what I tend to do is save the file under
the name it gets given in the temp directory, and in the DB store its
original name, the temp name it's stored under, extension & any other
info I might find useful (such as the user who uploaded it if this is a
user-based system like a CMS)


-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk



[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