Click to See Complete Forum and Search --> : Php Files<>mysql Blob


gruetztian
03-16-2004, 05:03 AM
need your help

at present I gain experiences at working with BLOB fieldtypes in MySql. Blob is a type that can store every binary data like pictures, text documents etc. thats rigth?How do i work with PHP Uploads and $_FILES i know.But further?

To insert a incoming picture ive tryed this:
(a table with only a blob field)

$query = "INSERT INTO table_name VALUES (".$_FILES["name"].")";

should work or?

but the more complicated part, how to put the picture in a html <img>. The return value if a select the data from the database is a array?

olaf
03-16-2004, 08:56 AM
Hallo,

This will insert the filename into the database. You have to work with file functions. Don't ask me which function exactly because it will never put binary data into a database.