I have these three MySQL tables:
companies services auxiliary
id_company name_company id_service name_service id_company id_service
1 Google 1 Search 1 1
2 Yahoo 2 Calendar 1 2
3 Mail 1 3
4 Maps 1 4
2 1
2 3
I am wondering if I could display with only one query (I'm using php):
Google: Search, Calendar, Mail, Maps.
Yahoo: Search, Mail.
Now what I am doing is display the companies, and for each company I make another MySQL query to display the services. Is it possible to do that with only one query? Thank you.