Hi, I've made it work with DUMPFILE but its a BIG workaround for my php aplication: To insert I have to read the file received from the browser $_FILES[tmp_name] placed it in a directory for MySQL to read it, and them insert it into MySQL table with LOAD_FILE
To extract I have to use DUMPFILE and the read the file back in to a php var and them send it to the browser It works but it does not ugly...... On Thursday 11 August 2005 22:47, Kemin Zhou wrote: ::: Hi, ::: I remembered something when playing wiht BLOB. It looks that the select ::: statement does not ::: work well with BLOB. It always add or modify the BLOB a little bit. ::: Later I found out that ::: the client programming interfaces, perl,C++ etc tend to do well on BLOB ::: and files. ::: ::: Kemin ::: ::: Gleb Paharenko wrote: ::: >Hello. ::: > ::: >Use DUMPFILE instead of OUTFILE. See: ::: > http://dev.mysql.com/doc/mysql/en/select.html ::: > ::: >jose nuno neto <[EMAIL PROTECTED]> wrote: ::: >>Hi, ::: >> ::: >>I'm trying to use MySQL Blob columns to store files ::: >> (docs,gifs,pdf.....) but I'm getting corrupted files from the DB. ::: >> ::: >>the applications runs php, loading file content with addslashes but in ::: >> order to spot the error i've tried it with mysql only like this: ::: >>column file is a MEDIUMBLOB ::: >>INSERT INTO XXXXXX SET file=LOAD_FILE("/tmp/teste.pdf"); ::: >>and them ::: >>SELECT file INTO OUTFILE "/tmp/teste_frommysql.pdf" FROM XXXXXX WHERE ::: >> id=12; ::: >> ::: >>and teste_frommysql.pdf cant be loaded ::: >>ls -l shoes that the sizes are different: ::: >>270713 Aug 2 11:28 /tmp/teste.pdf (ORIGINAL) ::: >>277405 Aug 10 17:21 /tmp/teste_frommysql.pdf ::: >> ::: >>I've made a test with a text file and noticed that the file from MySQL ::: >> has a added LineBreak at the end.Is thta the problem? how can I fix ::: >> this? ::: >> ::: >>This is my config: ::: >>Linux 2.6.11-1.1369_FC4 ::: >>mysql-server-4.1.11-2 ::: >>mysql-4.1.11-2 ::: >> ::: >>cat /etc/my.cnf ::: >>[mysqld] ::: >>datadir=/var/lib/mysql ::: >>socket=/var/lib/mysql/mysql.sock ::: >> ::: >>[mysql.server] ::: >>user=mysql ::: >>basedir=/var/lib ::: >> ::: >>[safe_mysqld] ::: >>err-log=/var/log/mysqld.log ::: >>pid-file=/var/run/mysqld/mysqld.pid ::: >> ::: >>key_buffer_size=64M ::: >>table_cache=256 ::: >>sort_buffer_size=4M ::: >>read_buffer_size=1M -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]