If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > load binary file into table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-27-04, 14:30
physse physse is offline
Registered User
 
Join Date: May 2004
Posts: 1
load binary file into table

i would like to insert a binary file into a table. i know that most people think that it is more efficient just to store the directory path of the file in the db. anyway, i created a blob column but don't know what the mysql command line command to load a binary file into a table is? just didn't find anything about it in the mysql doc!

thanks for any help!!!
Reply With Quote
  #2 (permalink)  
Old 05-31-04, 07:44
omiossec omiossec is offline
Registered User
 
Join Date: Jan 2003
Location: Paris, France
Posts: 320
You can use LOAD_FILE() function

UPDATE table_name
SET blob_column=LOAD_FILE('pathto binary file');
__________________
Olivier Miossec
--
http://www.lasso-developpeur.net/
--
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On