Basically the question is how to get from this:
id string 1 A 1 B 2 C
to this:
id string 1 A B 2 C
Basically the question is how to get from this:
id string 1 A 1 B 2 C
to this:
id string 1 A B 2 C
SELECT id, GROUP_CONCAT(string SEPARATOR ' ') FROM table GROUP BY id;
http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#function_group-concat
SELECT id, GROUP_CONCAT( string SEPARATOR ' ') FROM table GROUP BY id
More details here.
SELECT id, GROUP_CONCAT(CAST(string as CHAR)) FROM table GROUP BY id
Will give you a comma-delimited string