| Author |
how to upload an audio file into MySql using SQL command
|
utsav gupta
Ranch Hand
Joined: Mar 19, 2009
Posts: 57
|
|
Hi
I have an audio file which I want to insert into a database using plain sql command. How do I do that?
I know its not a good idea to do that but the audio files are very small (hardly few kbs)
I understand that the files have to be converted into a binary stream and inserted in the form of BLOB but how do i do that is there an inbuilt function in MySQL to convert the file into BLOB?
I cannot use java or any other programming language just sql and windows batch commands.
Please reply.
Thanks
Utsav.
|
 |
William P O'Sullivan
Ranch Hand
Joined: Mar 28, 2012
Posts: 860
|
|
A simple search ...
INSERT INTO blob_tabl (some_col) values(load_file('/path/to/file'));
WP
|
 |
utsav gupta
Ranch Hand
Joined: Mar 19, 2009
Posts: 57
|
|
wow!
I wonder how did i miss that in google!
Thank You William!
|
 |
 |
|
|
subject: how to upload an audio file into MySql using SQL command
|
|
|