Some MySQL clients, such as the MySQL command-line tool, can export the result set in various formats, such as XML.
If you use a programming language that implements the MySQL client / server protocol through some type of API, it looks like creating an array will be trivial in code. The PHP MySQL API returns the results to an array.
If you're talking about grouping multiple rows in a result set into one row, see GROUP_CONCAT .
Marcus Adams Jan 26 '12 at 20:30 2012-01-26 20:30
source share