For getting records returned by a sql query in one column comma seperated we can use
SELECT GROUP_CONCAT(columnname) AS columnname FROM tablename WHERE condition .
This query will return all query results for paticular column in one column comma seperated.