mysql - MY SQL QUERY DATA ARRANGING -
let's have mysql query results in following lines .
col1data col2data1 col3data col4data col1data col2data2 col3data col4data col1data col2data3 col3data col4data
note data in columns bar second 1 same . question : there way via query have results in form
col1data col3data col4data col2data1 col2data2 col2data3
putting different data on same line ?
if want records col2
combined single delimited string, can group table using mysql's group_concat()
function:
select col1, col3, col4, group_concat(col2) my_table group col1, col3, col4
see on sqlfiddle.
Comments
Post a Comment