这样件表应该更好:
create table doc(docfileid int not null primary key,
                  docfile  blob
                 )
在mysql中有个函数 mysql_escaper_string()它的功能之一就是把图像数据加载到一个表中。