對不起,我的英語)我有3張桌子。接下來類型:將多行組合成一行並放入表中MySQL
表1 - 用戶
--------------------------------
| id | email | password |
--------------------------------
| 1 | 1 | 3 |
| 2 | 1 | 4 |
| 3 | 1 | 3 |
| 4 | 1 | 4 |
| 5 | 2 | 3 |
| 6 | 2 | 4 |
| 7 | 2 | 3 |
| 8 | 2 | 4 |
--------------------------------
表2:分數
---------------------------
id | idUser | nameScore|
--------------------------------
| 1 | 1 | df |
| 2 | 1 | sa |
| 3 | 1 | as |
| 4 | 1 | 4 |
| 5 | 2 | 3 |
| 6 | 2 | 4 |
| 7 | 2 | 3 |
| 8 | 2 | 4 |
-------------------------------|
表3:支付
--------------------------------------------------
| id | idScorePayer |idScorePayee| money
--------------------------------------------------
| 1 | 1 | 2 | 1000
| 2 | 2 | 4 | 700
| 3 | 3 | 1 | 1500
| 4 | 4 | 3 | 9000
---------------------------------------------------
我試着去輸出什麼:
-----------------------------------------------
| id | emailPayer | emailPayee | money
-----------------------------------------------
| 1 | [email protected] | [email protected] |
| 2 | [email protected] | [email protected] |
| 3 | [email protected] | [email protected] |
| 4 | [email protected] | [email protected] |
| 5 | [email protected] | [email protected] |
| 6 | [email protected] | [email protected] |
| 7 | [email protected] | [email protected] |
| 8 | [email protected] | [email protected] |
-----------------------------------------------
你可以構建你的表好一點嗎?以及更多地解釋價值? – JanR
你的問題不是很清楚,你會得到黃色,藍色,餅乾,牛奶? \t請閱讀[**如何提問**](http://stackoverflow.com/help/how-to-ask) \t \t這裏是[** START **]( http://spaghettidba.com/2015/04/24/how-to-post-at-sql-question-on-a-public-forum/)瞭解如何提高您的問題質量並獲得更好的答案。 –
電子郵件表格未顯示 –