I have a mysql database table with audio data in MEDIUMBLOB fields. The thing is, one audio file is in different rows. So I want to join them. When I do this:
select data from audio where id=1 into outfile "output" fields escaped by '';
.. I get audio. When I do the same thing for id=2, I get audio. When I put them together:
select data from audio order by date, time into outfile "output" fields escaped by '';
.. I get audio for awhile, then high amplitude noise. The noise starts where id=2 would have been. If I select more than two columns to put together, sometimes the output from that particular id is noise, sometimes it's the correct audio. It's not exactly interleaved.
So, how can I extract and concatenate blobs from multiple rows into a coherent binary output file?
Edit: this is raw audio data. E.g. to read it into Audacity you would go to import->raw.