我在mysql數據庫中有兩個名爲'Customers
'和'Committeetables
'的表。他們下面的列 表:客戶表總結成laravel中的單表
nd Name FatherName Cell# AdvanceAmount
25 Waseem Asghar 0302 2500
30 Ramzan Khan 0303 3500
35 Rana Ali 0307 2000
表:CommitteeTables
nd Amount RecievingDate DrawDate
25 1500 2-10-15 10-10-15
30 1500 2-10-15 10-10-15
25 1500 3-10-15 10-11-15
30 1500 3-10-15 10-11-15
35 1500 3-10-15 10-11-15
在 'Customers
' 表中的列 'nd
' 是主鍵,在 'CommitteeTables
' 表的外鍵。這意味着'Customers
'表通過'nd
'列與'ComitteeTables
'表連接。 預期結果表應該是爲下:
nd Name Father Name Cell# Advance Amount Balance
25 Waseem Asghar 0302 25000 3000 22000
30 Ramzan Khan 0303 35000 3000 32000
32 Rana Ali 0307 20000 1500 18500
----------------------------------------------------------------------------
total 80000 7500 72500
我使用Laravel 5和HTML,引導。我在Laravel 5中需要這個結果。如果有人幫我解決我的問題,我將非常感激。
感謝
克瓦
到目前爲止您是否嘗試過任何疑問? – Bogdan