0
我使用創建付款收據,我會支付一定金額像例如回到同一ID組的最後一個插入行中的MySQL
下面這已經創造了收據,但再有薪due_amount
cust_id cust_name invoice_id paid_amount due amount makeapayment
1001 SAS 545 76 305 sasi
這我的查詢結果。
我必須支付到期金額100然後在相同的「ID」後付費創建另一行視圖中的新行舊行並不認爲僅僅停留在數據庫中看到導致這樣
cust_id cust_name invoice_id paid_amount due amount makeapayment
1001 SAS 545 76 205 sasi
目前我使用的查詢
SELECT pid, cust_id, cust_name, date, invoice_id, invoice_date, invoice_amount, paid_amount, paymentmade, makeapayment, due_amount, status FROM print_reciept
group by cust_id having due_amount!='0' ORDER BY pid DESC
不檢索任何價值完全是空的,先生給我另一個查詢 – sasi