First, I suggest using LONGBLOB as a field...
Second, Once the $userfile is uploaded...use the statment as:
$query = "INSERT INTO ... (file) VALUES ( LOAD_FILE($userfile))";
using the MySql's LOAD_FILE()
"Tom Gitzinger" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi friends,
> could anybody tell me how I best store one or several uploaded files in a
> MySQL database (as a BLOB). I use PHP 3.
> Let's say I have the variable $userfile. Is it possible to simply insert
> this into the database?
> $query = "INSERT INTO ... (file) VALUES (" . $userfile . ");
> By the way: which version of PHP 3 do you need to upload several files at
> GMX - Die Kommunikationsplattform im Internet.
> GMX Tipp:
> Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
PHP General 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]