chiou%2dguey,
Wednesday, April 03, 2002, 9:47:50 PM, you wrote:

c2l> I am trying to store a .gz file in a BLOB field in a mysql database.  I have
c2l> tried two commands :
c2l> 1. Insert into mytable values('1', 'file1.gz');
c2l> 2  Insert into mytable values('1,','\'file1.gz\'');

c2l> These two commands just store the name of the file in the BLOB field instead of
c2l> the content of the file.  How should I do my Insert statement in mysql?

INSERT INTO table_name VALUES ('1', LOAD_FILE('/path/to/your/file'));

c2l> Thanks.




-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to