sql是没错的,但是对foreach的用法不熟练,insert的时候 不能使用标红的那一块去加括号,
会报错Column count doesn't match value count at row 1
正确方式如上
具体原因如下