Let's say I have
SELECT name
FROM table
which gives me something like
foo
bar
baz
and I need to join all the values, to make it into one string like
foo bar baz
so I guess it would be something like
foreach row in (select ...)
var += row
but I have absolutely no idea how to write it in MySQL.