我在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