From andreasfriedrich:
$fp = fopen("s:/title.gif", "rb");
$content = mysql_escape_string(fread($fp, filesize "s:/title.gif")));
$y = mysql_query("INSERT INto table SET content='$content'");
The field must be BLOB type.
more info:
http://www.webmasterworld.com/forum88/754.htm
Note: Opening a picture from a database will drain the server resources...