在这里,我需要通过一个查询在import { Component, OnInit } from '@angular/core';
import { MyService } from '../shared/my.service';
@Component({
selector: 'my-list',
templateUrl: './my.component.html',
styleUrls: ['./my.component.scss']
})
export class MyListComponent implements OnInit {
mys: any[] = [];
constructor(private myService: MyService) { }
ngOnInit() {
const myObservable = this.myService.getMys();
myObservable.subscribe(
(mys) => {
this.mys = mys;
},
(err) => {
},
() => {
}
);
}
}
表中添加多个记录。
我有一个带有MySQL
,Price
,Quantity
,Width
和Height
列的发票。 Total
列等于Total
。
有添加行按钮和删除行按钮,用于添加和删除发票行。发票中还有一个(price * quantity * width * Height)
字段,用于计算所有产品总计的总和。
现在,我想通过一个查询将此发票添加到MySQL数据库中。 如何在按下“提交”按钮时在MySQL数据库中添加多个发票行?
Grand Total