List:General Discussion« Previous MessageNext Message »
From:Steve Ruby Date:June 20 2000 3:15pm
Subject:Re: Storing BLOBs ??is it a faq?
View as plain text  
UPDATE bintable set filecolumn = load_file("path to file") 
WHERE ID = x;

of course ID=x should be however you plan on identifying the row
you are putting it into.

"Dr. Dieter Becker" wrote:
> 
> Thank You very much,
> 
> but there rests a little question. How to insert this binary file in a
> defined row? All other data are in this row, only the binary file must be
> inserted?
> 
> Dieter
> 
> Dr. med. Dipl.-Math. Dieter Becker
> Medizinische Universitäts- und Poliklinik
> Innere Medizin III
> D66421 Homburg
> -----------------------------------------
> Tel: 06841 16 3046 / -3077
> Fax: 06841 16 3043 / -3385
> Email: db@stripped
> 
> -----Original Message-----
> From: sinisa@stripped [mailto:sinisa@stripped]
> Sent: Tuesday, June 20, 2000 3:46 PM
> To: db@stripped
> Cc: mysql@stripped
> Subject: Re: Storing BLOBs ??is it a faq?
> 
> 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       |
> +----------------------------------------------------------------------+
> 
> --
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/php/manual.php3" before
> posting. To request this thread, e-mail mysql-thread40958@stripped
> 
> To unsubscribe, send a message to:
>     <mysql-unsubscribe-steve=rubysolutions.com@stripped>
Thread
Storing BLOBs ??is it a faq?Dr. Dieter Becker20 Jun
  • Re: Storing BLOBs ??is it a faq?sinisa20 Jun
    • RE: Storing BLOBs ??is it a faq?Dr. Dieter Becker20 Jun
      • RE: Storing BLOBs ??is it a faq?sinisa20 Jun
      • Re: Storing BLOBs ??is it a faq?Steve Ruby20 Jun
    • Re: Storing BLOBs ??is it a faq?Mark Lo20 Jun
      • Re: Storing BLOBs ??is it a faq?Masood Nasir20 Jun
      • Re: Storing BLOBs ??is it a faq?sinisa21 Jun
    • Re: Storing BLOBs ??is it a faq?Mark Lo21 Jun
      • Re: Storing BLOBs ??is it a faq?sinisa21 Jun
        • Re: Storing BLOBs ??is it a faq?Thimble Smith21 Jun
RE: Storing BLOBs ??is it a faq?Dennis Gearon20 Jun