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

From: Date: Mon, 28 Mar 2011 06:11:59 +0000
Subject: Re: is there any syntax to save a file in mysql?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-312080@lists.php.net to get a copy of this message
On Mon, 2011-03-28 at 07:36 +0200, Hans Ã…hlin wrote: > 2011/3/28 Negin Nickparsa <nickparsa@gmail.com>: > > 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 Ó@Ô·¹¦¤1 > Öð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

« previous php.general (#312080) next »