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

> 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 ;).


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to