Was just wondering if it would be possible to add a feature to a future release of mysql.
I am a junior web developer and use mysql (with PHP) on a daily basis, basically the feature is when you run a query with mysql join in it, rather than having to loop through normalized tables in order to retrieve multiple rows of data, being able to put array braces ([]) next to a field and it would retrieve every row of that field that matches the clauses and return it in a multi-dimensional array
so
"SELECT c.customer, c.companyName, co.f_name, co.l_name, ci.info[]
FROM customers c INNER JOIN ( contact co, contact_info ci )
ON ( c.customer_id = co.customer_id AND ci.contact_id = co.contact_id )
WHERE c.customer_id = $cust_id"
When run would return
array(
[customer] => John Smith,
[companyName] => JS & Co,
[f_name] => John,
[l_name] => Smith,
[info] => array(
john.smith@js.com, 0156 303 4543, +4479234954345 )
);
Would this be possible/feasible. I know it would make mine and many others experience of using mysql much more pleasant.
Thanks for reading.