Re: inserting data in SQL Server 2000

From: Date: Tue, 10 Apr 2001 17:54:56 +0000
Subject: Re: inserting data in SQL Server 2000
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-8449@lists.php.net to get a copy of this message
On Tue, 10 Apr 2001, Lucio Stoco wrote: > Hi, i´m from Brazil... > > I would like to know how can i insert a file in a database. If I were you, I'd not do this... Of course, it depends on what you want to do. What is best is to insert the path location of the file in the database. > First i uploaded the file, second i read the file and put it in a string. > After, i created a 'TEXT' field type. I tried to insert... but just was > inserted a piece of file. That's probably because the TEXT type implies a maximum length (see the SQL documentation for more info)... You might try some other types if you desperately need to put the whole file in the database (longtext ?). The result will be the same though, you will be able to store a bigger file, but will still have problems when it comes to storing a huge one ;). -- Ben

« previous php.db (#8449) next »