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

2011-03-27 Thread Ashley Sheridan
On Mon, 2011-03-28 at 07:36 +0200, Hans Åhlin wrote:

> 2011/3/28 Negin Nickparsa :
> > 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




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

2011-03-27 Thread Hans Åhlin
2011/3/28 Negin Nickparsa :
> 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
**

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