From: <sinisa Date: June 20 2000 1:46pm Subject: Re: Storing BLOBs ??is it a faq? List-Archive: http://lists.mysql.com/mysql/40947 Message-Id: <14671.30112.597415.294208@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Dr. Dieter Becker writes: > Sirs > > I want to save a binary information (eg. a picture ) in a special row of a > database table. The data is in a file "bindata.bin" and should be loaded to > a table. An "incorrect" insert would be: > load data local infile 'bindata.bin' into table binbin (binfield) where > binbin.id = "xxx" > > Is there any possibility to insert or load binary data into a special field > and a selected row of the table. > > Thanks > > Dieter > Hi! If you use 3.23, then do it with a command like this: insert into binbin (binfield) values(load_file("/tmp/bindata.bin"); otherwise, if you use 3.22, you will have to use a program like this one: http://www.mysql.com/mysql++-examples.html Regards, Sinisa +----------------------------------------------------------------------+ | ____ __ _____ _____ ___ == MySQL AB | | /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic | | /*/ /*/ /*/ \*\_ |*| |*||*| mailto:sinisa@stripped | | /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaka, Cyprus | | /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ | | ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ | | /*/ \*\ Developers Team | +----------------------------------------------------------------------+