此查询在我的 mysql 编辑器中完美运行:
INSERT into brokercomps2 (company, memnumbers)
SELECT employee.company, count(*)
FROM employee, brokercomps
WHERE employee.company = brokercomps.company group by employee.company;
但是,当我尝试从 php webserver 运行时,它失败了:
sql6 = "INSERT into brokercomps2 (company, memnumbers) SELECT employee.company, count(*) FROM employee, brokercomps WHERE employee.company = brokercomps.company group by employee.company";
用户权限正确,其他查询运行正常。