MySQL Forums
Forum List  »  Quality Assurance

FEATURE SUGGESTION
Posted by: Andy Holland
Date: May 12, 2011 01:35PM

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.

Options: ReplyQuote


Subject
Views
Written By
Posted
FEATURE SUGGESTION
1596
May 12, 2011 01:35PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.