select a.askid,a.title,GROUP_CONCAT(b.message SEPARATOR '----') as content from gg_ask as a join gg_ask_posts as bon a.askid=b.askid GROUP BY a.askid;