special outfile mysql with string inserted? -


i have 3 columns in mysql table

col1       col10      col11 longblob1 longblob10  longblob11 

i want output following format :

 @col1 col10  +  col11  

(it's called fastq file lil' biochemist me out there ..)

so thought querying output that, doesn't go next line prints out /n character .. :

select '@',col1, col10,'/n','+','/n',col11 mytable outfile '/mypath/myfile.txt'; 

you searching string concatenation (additionaly, escaping wrong, it's \n, not /n):

select concat('@', col1, col10, '\n+\n', col11) mytable outfile '/mypath/myfile.txt'; 

learn more concat() here.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -