-1

此查询在我的 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";

用户权限正确,其他查询运行正常。

4

1 回答 1

2

您需要使用类似mysql_query()的函数。不过,我会推荐mysqliPDO

于 2013-06-12T16:02:06.700 回答