Dumping blob rows to files from MySQL -


I have a table with some thousand rows in it, which has some integer columns and a blank column. I want to dump each row as my file, which contains the content block and the integer being used to name the file. This session is so fast and dirty. Okay one obstacle is that I do not have any tools installed in this environment, so that I am a part of God's cost, despite what I do.


Edit: I ended up using C # from another box. It only downloaded the given code in the answer given below and took about the same amount.

In general discussion, using CLSQL, something similar (untested, not MySQL) ) Currently installed):

  (requires' clsql) (clsql-mysql is required) (clsql: connect (host db user password port): database type: mysql ) (Clsql: do-some ("col1 col2 blob") (col1, col2 blob) "blobtable to col1, col2, select blob") (with-open-file (outfile (format zero "~ a- ~ a "Col1 col2): direction: output: element-type 'byte' (write sequence The Outfile)))  

You have to fill the host, DB etc. (the port is optional), and of course, adjust the query.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -