I want a page that displaying data client. Here's my page that I want:
----------------------------------
name | skill A | skill B
----------------------------------
John | PHP | MySQL, Javascript
Doe | Javascript | MySQL
Richard | PHP | Javascript
----------------------------------
and here are my MySQL tables:
client table:
-----------------------------------------
id_client | name_client | email_client
-----------------------------------------
1 | John | [email protected]
2 | Doe | [email protected]
3 | Richard | [email protected]
------------------------------------------
skill table
-----------------------------
id_skill | name_skill
-----------------------------
1 | PHP
2 | MySQL
3 | Javascript
-----------------------------
client_skill
---------------------------------
skill | client | status
---------------------------------
1 | 1 | A
2 | 1 | B
3 | 2 | A
2 | 2 | B
1 | 3 | A
3 | 3 | B
---------------------------------
From these I want to diplaying data that join three tables group by id_client and each client has skill that group by value of skill client that A and B.
So I want to display client skill A and client Skill B in one row. What query should use and how to echoing in JSON so I can display it in angularjs?